summaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 354d3106c from llvm git (by Kai Luo):Dimitry Andric2020-11-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [PowerPC] Skip combining (uint_to_fp x) if x is not simple type Current powerpc64le backend hits ``` Combining: t7: f64 = uint_to_fp t6 llc: llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h:291: llvm::MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() && "Expected a SimpleValueType!"' failed. ``` This patch fixes it by skipping combination if `t6` is not simple type. Fixed https://bugs.llvm.org/show_bug.cgi?id=47660. Reviewed By: #powerpc, steven.zhang Differential Revision: https://reviews.llvm.org/D88388 This should fix the llvm assertion mentioned above when building the following ports for powerpc64le: * audio/traverso * databases/percona57-pam-for-mysql * databases/percona57-server * emulators/citra * emulators/citra-qt5 * games/7kaa * graphics/dia * graphics/mandelbulber * graphics/pcl-pointclouds * net-p2p/libtorrent-rasterbar * textproc/htmldoc Requested by: pkubaj MFC after: 3 days Notes: svn path=/head/; revision=367485
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-09-163-13/+17
| | | | | | | | | | release/11.x llvmorg-11.0.0-rc2-91-g6e042866c30. MFC after: 6 weeks X-MFC-With: r364284 Notes: svn path=/head/; revision=365807
* Merge commit 95e18b2d9d5f from llvm git (by Kang Zhang):Dimitry Andric2020-08-211-2/+2
| | | | | | | | | | | | | | [PowerPC] Fix a typo for InstAlias of mfsprg D77531 has a type for mfsprg, it should be mtsprg. This patch is to fix this typo. This should fix booting powerpc64 kernels, after LLVM 11 was imported. PR: 248763 Notes: svn path=/head/; revision=364455
* Merge commit 4d52ebb9b9c7 from llvm git (by Chen Zheng):Dimitry Andric2020-08-172-20/+35
| | | | | | | | | | | | | | [PowerPC] Make StartMI ignore COPY like instructions. Reviewed By: lkail Differential Revision: https://reviews.llvm.org/D85659 This fixes an assertion failure when building world for powerpc. It was reported upstream as <https://bugs.llvm.org/show_bug.cgi?id=47041>. Notes: svn path=/head/; revision=364314
* Revert r364275, for reapplying the final upstream fix:Dimitry Andric2020-08-172-28/+19
| | | | | | | | | Tentatively apply https://reviews.llvm.org/D85659, which fixes an assertion failure when building world for powerpc. This has been reported upstream as <https://bugs.llvm.org/show_bug.cgi?id=47041>. Notes: svn path=/head/; revision=364313
* Tentatively apply https://reviews.llvm.org/D85659, which fixes anDimitry Andric2020-08-162-19/+28
| | | | | | | | assertion failure when building world for powerpc. This has been reported upstream as <https://bugs.llvm.org/show_bug.cgi?id=47041>. Notes: svn path=/projects/clang1100-import/; revision=364275
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-08-152-5/+18
| | | | | | | release/11.x llvmorg-11.0.0-rc1-47-gff47911ddfc. Notes: svn path=/projects/clang1100-import/; revision=364253
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-07-311-8/+19
| | | | | | | release/11.x llvmorg-11.0.0-rc1-25-g903c872b169. Notes: svn path=/projects/clang1100-import/; revision=363746
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-07-315-31/+67
| | | | | | | release/11.x llvmorg-11-init-20933-g3c1fca803bc. Notes: svn path=/projects/clang1100-import/; revision=363743
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-07-3169-6426/+10718
| | | | | | | | | | | | master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. Note that for now, I rolled back all our local changes to make merging easier, and I will reapply the still-relevant ones after updating to 11.0.0-rc1. Notes: svn path=/projects/clang1100-import/; revision=363742
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-06-281-2/+5
| | | | | | | | | | | | | | | | llvmorg-10.0.1-rc2-0-g77d76b71d7d. Also add a few more llvm utilities under WITH_CLANG_EXTRAS: * llvm-dwp, a utility for merging DWARF 5 Split DWARF .dwo files into .dwp (DWARF package files) * llvm-size, a size(1) replacement * llvm-strings, a strings(1) replacement MFC after: 3 weeks Notes: svn path=/head/; revision=362719
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-06-258-2/+62
| | | | | | | | | llvmorg-10.0.0-129-gd24d5c8e308. Getting closer to 10.0.1-rc2. MFC after: 3 weeks Notes: svn path=/head/; revision=362609
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-05-231-3/+6
| | | | | | | | | llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1). MFC after: 3 weeks Notes: svn path=/head/; revision=361410
* Merge commit 64b31d96d from llvm git (by Nemanja Ivanovic):Dimitry Andric2020-04-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | [PowerPC] Do not attempt to reuse load for 64-bit FP_TO_UINT without FPCVT We call the function that attempts to reuse the conversion without checking whether the target matches the constraints that the callee expects. This patch adds the check prior to the call. Fixes: https://bugs.llvm.org/show_bug.cgi?id=43976 Differential revision: https://reviews.llvm.org/D77564 This should fix 'Assertion failed: ((Op.getOpcode() == ISD::FP_TO_SINT || Subtarget.hasFPCVT()) && "i64 FP_TO_UINT is supported only with FPCVT"), function LowerFP_TO_INTForReuse, file /usr/src/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp, line 7276' when building the devel/libslang2 port (and a few others) for PowerPC64. Requested by: pkubaj MFC after: 6 weeks X-MFC-With: 358851 Notes: svn path=/head/; revision=360134
* Revert commit b6cf400aa fro llvm git (by Nemanja Ivanovic):Dimitry Andric2020-04-151-1/+0
| | | | | | | | | | | | | | | | | | Fix bots after a9ad65a2b34f In the last commit, I neglected to initialize the new subtarget feature I added which caused failures on a few bots. This should fix that. This unbreaks the build after r359981, which reverted upstream commit a9ad65a2b34f. Reported by: jhibbits (and jenkins :) MFC after: 6 weeks X-MFC-With: 358851 Notes: svn path=/head/; revision=359994
* Revert commit a9ad65a2b from llvm git (by Nemanja Ivanovic):Dimitry Andric2020-04-153-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | [PowerPC] Change default for unaligned FP access for older subtargets This is a fix for https://bugs.llvm.org/show_bug.cgi?id=40554 Some CPU's trap to the kernel on unaligned floating point access and there are kernels that do not handle the interrupt. The program then fails with a SIGBUS according to the PR. This just switches the default for unaligned access to only allow it on recent server CPUs that are known to allow this. Differential revision: https://reviews.llvm.org/D71954 This upstream commit causes a compiler hang when building certain ports (e.g. security/nss, multimedia/x264) for powerpc64. The hang has been reported in https://bugs.llvm.org/show_bug.cgi?id=45186, but in the mean time it is more convenient to revert the commit. Requested by: jhibbits MFC after: 6 weeks X-MFC-With: 358851 Notes: svn path=/head/; revision=359981
* Merge commit 459e8e948 from llvm git (by Justin Hibbits):Dimitry Andric2020-03-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | [PowerPC]: Don't allow r0 as a target for LD_GOT_TPREL_L/32 Summary: The linker is free to relax this (relocation R_PPC_GOT_TPREL16) against R_PPC_TLS, if it sees fit (initial exec to local exec). If r0 is used, this can generate execution-invalid code (converts to 'addi %rX, %r0, FOO, which translates in PPC-lingo to li %rX, FOO). Forbid this instead. This fixes static binaries using locales on FreeBSD/powerpc (tested on FreeBSD/powerpcspe). Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D76662 Requested by: jhibbits MFC after: 6 weeks X-MFC-With: 358851 Notes: svn path=/head/; revision=359334
* Merge commit f0990e104 from llvm git (by Justin Hibbits):Dimitry Andric2020-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | [PowerPC]: e500 target can't use lwsync, use msync instead The e500 core has a silicon bug that triggers an illegal instruction program trap on any sync other than msync. Other cores will typically ignore illegal sync types, and the documentation even implies that the 'illegal' bits are ignored. Address this hardware deficiency by only using msync, like the PPC440. Differential Revision: https://reviews.llvm.org/D76614 Requested by: jhibbits MFC after: 6 weeks X-MFC-With: 358851 Notes: svn path=/head/; revision=359333
* Merge ^/vendor/lvm-project/master up to its last change (upstream commitDimitry Andric2020-01-2443-2288/+3936
| | | | | | | e26a78e70), and resolve conflicts. Notes: svn path=/projects/clang1000-import/; revision=357095
* Merge ^/vendor/llvm/dist up to its last change, and resolve conflicts.Dimitry Andric2020-01-2245-1245/+2170
| | | | Notes: svn path=/projects/clang1000-import/; revision=356992
* Merge commit bc4bc5aa0 from llvm git (by Justin Hibbits):Dimitry Andric2020-01-202-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 8548 CPU definition and attributes 8548 CPU is GCC's name for the e500v2, so accept this in clang. The e500v2 doesn't support lwsync, so define __NO_LWSYNC__ for this as well, as GCC does. Differential Revision: https://reviews.llvm.org/D67787 Merge commit ff0311c4b from llvm git (by Justin Hibbits): [PowerPC]: Add powerpcspe target triple subarch component Summary: This allows the use of '-target powerpcspe-unknown-linux-gnu' or 'powerpcspe-unknown-freebsd' to be used, instead of '-target powerpc-unknown-linux-gnu -mspe'. Reviewed By: dim Differential Revision: https://reviews.llvm.org/D72014 Merge commit ba91dffaf from llvm git (by Fangrui Song): [Driver][PowerPC] Move powerpcspe logic from cc1 to Driver Follow-up of D72014. It is more appropriate to use a target feature instead of a SubTypeArch to express the difference. Reviewed By: #powerpc, jhibbits Differential Revision: https://reviews.llvm.org/D72433 commit 36eedfcb3 from llvm git (by Justin Hibbits): [PowerPC] Fix powerpcspe subtarget enablement in llvm backend Summary: As currently written, -target powerpcspe will enable SPE regardless of disabling the feature later on in the command line. Instead, change this to just set a default CPU to 'e500' instead of a generic CPU. As part of this, add FeatureSPE to the e500 definition. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D72673 These are needed to unbreak the build for powerpcspe. Requested by: jhibbits MFC after: 1 week Notes: svn path=/head/; revision=356929
* [PowerPC64] Starting from FreeBSD 13.0, default to ELFv2 ABIJustin Hibbits2019-12-271-0/+14
| | | | | | | | | | | | | | | This changes the LLVM default powerpc64 ABI to ELFv2, if target OS is FreeBSD >= 13.0 This will also be sent upstream. Submitted by: alfredo.junior_eldorado.org.br Reviewed by: dim, luporl Relnotes: YES Differential Revision: https://reviews.freebsd.org/D20383 Notes: svn path=/head/; revision=356112
* Merge commit d3aeac8e2 from llvm git (by Justin Hibbits)Dimitry Andric2019-12-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | [PowerPC] Only use PLT annotations if using PIC relocation model Summary: The default static (non-PIC, non-PIE) model for 32-bit powerpc does not use @PLT annotations and relocations in GCC. LLVM shouldn't use @PLT annotations either, because it breaks secure-PLT linking with (some versions of?) GNU LD. Update the available-externally.ll test to reflect that default mode should be the same as the static relocation, by using the same check prefix. Reviewed by: sfertile Differential Revision: https://reviews.llvm.org/D70570 Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D22913 Notes: svn path=/head/; revision=356100
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2019-12-223-68/+128
| | | | | | | | | | | | | | | | | | 9.0.1 final release c1a0a213378a458fbea1a5c77b315c7dce08fd05. Release notes for llvm, clang, lld and libc++ 9.0.1 will become available here: https://releases.llvm.org/9.0.1/docs/ReleaseNotes.html https://releases.llvm.org/9.0.1/tools/clang/docs/ReleaseNotes.html https://releases.llvm.org/9.0.1/tools/lld/docs/ReleaseNotes.html https://releases.llvm.org/9.0.1/projects/libcxx/docs/ReleaseNotes.html PR: 240629 MFC after: 1 month Notes: svn path=/head/; revision=356004
* Move all sources from the llvm project into contrib/llvm-project.Dimitry Andric2019-12-2098-0/+82924
This uses the new layout of the upstream repository, which was recently migrated to GitHub, and converted into a "monorepo". That is, most of the earlier separate sub-projects with their own branches and tags were consolidated into one top-level directory, and are now branched and tagged together. Updating the vendor area to match this layout is next. Notes: svn path=/head/; revision=355940