aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/AutoUpgrade.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-07-12[AVX512] Remove masked logic op intrinsics and autoupgrade them to native IR.Craig Topper1-0/+21
llvm-svn: 275155
2016-07-12[X86,IR] Remove unnecessary or unused LLVMContext parameter from some of the ↵Craig Topper1-17/+16
X86 intrinsic upgrade functions. llvm-svn: 275138
2016-07-09[X86] Remove and autoupgrade 512-bit non-temporal store intrinsics.Craig Topper1-2/+6
llvm-svn: 274966
2016-07-08Move setName after accessing NameEric Liu1-5/+2
llvm-svn: 274862
2016-07-08Make a std::string copy of StringRef Name so that it remains valid when the ↵Eric Liu1-1/+4
original Name is overridden. Summary: lib/IR/AutoUpgrade.cpp:348 and lib/IR/AutoUpgrade.cpp:350 upset sanitizer. Reviewers: bkramer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D22140 llvm-svn: 274861
2016-07-08[AVX512] Remove and autoupgrade a duplicate set of 512-bit masked shift ↵Craig Topper1-1/+24
intrinsics. I'm not sure if clang ever used these builtin names or not. llvm-svn: 274827
2016-07-07[AVX512] Zero extend the result of vpcmpeq/vpcmpgt and similar intrinsics in ↵Craig Topper1-2/+3
the autoupgrade code. This currently results in worse codegen but is needed for correctness. llvm-svn: 274736
2016-07-05[X86][AVX512] Autoupgrade the BROADCAST intrinsicsSimon Pilgrim1-1/+9
llvm-svn: 274550
2016-07-04[IR,X86] Remove some intrinsic prefixes earlier in the auto-upgrade code so ↵Craig Topper1-214/+226
we can shorten the length of the comparison strings and avoid repeatedly comparing the common prefix. No functional change intended. llvm-svn: 274522
2016-07-04[X86][AVX512] Autoupgrade the VPERMPD/VPERMQ intrinsicsSimon Pilgrim1-0/+18
llvm-svn: 274506
2016-07-04[X86][AVX512] Autoupgrade the VPERMILPD/VPERMILPS intrinsicsSimon Pilgrim1-1/+3
llvm-svn: 274498
2016-07-02[X86][AVX512] Autoupgrade the MOVDDUP/MOVSLDUP/MOVSHDUP intrinsicsSimon Pilgrim1-0/+25
llvm-svn: 274439
2016-06-28Support arbitrary addrspace pointers in masked load/store intrinsicsArtur Pilipenko1-0/+34
This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details). This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace. The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics. Reviewed By: reames Differential Revision: http://reviews.llvm.org/D17270 llvm-svn: 274043
2016-06-27Revert -r273892 "Support arbitrary addrspace pointers in masked load/store ↵Artur Pilipenko1-34/+0
intrinsics" since some of the clang tests don't expect to see the updated signatures. llvm-svn: 273895
2016-06-27Support arbitrary addrspace pointers in masked load/store intrinsicsArtur Pilipenko1-0/+34
This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details). This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace. The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics. Reviewed By: reames Differential Revision: http://reviews.llvm.org/D17270 llvm-svn: 273892
2016-06-23[AVX512] Remove masked unpack intrinsics and autoupgrade to vectorshuffle ↵Craig Topper1-0/+36
and selects. llvm-svn: 273543
2016-06-21[AVX512] Remove the masked vpcmpeq/vcmpgt intrinsics and autoupgrade them to ↵Craig Topper1-0/+30
native icmps. llvm-svn: 273240
2016-06-18[X86][SSE4A] Autoupgrade and remove MOVNTSD/MOVNTSS intrinsicsSimon Pilgrim1-0/+25
Required better annotation of the instruction defs upon removal of the builtin intrinsic pattern. llvm-svn: 273077
2016-06-16[x86] autoupgrade and remove AVX2 integer min/max intrinsicsSanjay Patel1-4/+10
This will (hopefully very temporarily) break clang. The clang side of this should be the next commit. llvm-svn: 272932
2016-06-16[x86] autoupgrade and remove SSE2/SSE41 integer min/max intrinsicsSanjay Patel1-0/+36
Follow-up to: http://reviews.llvm.org/rL272806 http://reviews.llvm.org/rL272807 llvm-svn: 272907
2016-06-15fix comments; NFCSanjay Patel1-6/+3
llvm-svn: 272848
2016-06-13[AVX512] Remove maksed pshufd, pshuflw, and phufhw intrinsics and ↵Craig Topper1-3/+21
autoupgrade them to selects and shufflevector. llvm-svn: 272527
2016-06-13[X86] Refactor some of the X86 autoupgrade code to split mask vector and ↵Craig Topper1-74/+69
select generation into routines that can be reused for future intrinsic upgrades. NFC llvm-svn: 272526
2016-06-12[X86] Remove sse2 pshufd/pshuflw/pshufhw intrinsics and upgrade them to ↵Craig Topper1-1/+31
shufflevector. llvm-svn: 272510
2016-06-12[X86] Pre-allocate some of the shuffle mask SmallVectors in the auto upgrade ↵Craig Topper1-20/+12
code instead of calling push_back in a loop. This removes the need to check if the vector needs to grow on each iteration. llvm-svn: 272501
2016-06-12[X86] Greatly simplify the llvm.x86.avx.vpermil.* auto-upgrade code. We can ↵Craig Topper1-36/+18
fully derive everything using types of the intrinsic arguments rather than writing separate loops for each intrinsic. NFC llvm-svn: 272496
2016-06-12[X86,IR] Make use of the CreateShuffleVector form that takes an ↵Craig Topper1-20/+19
ArrayRef<uint32_t> to avoid the need to manually create a bunch of Constants and a ConstantVector. NFC llvm-svn: 272493
2016-06-12[IR] Require ArrayRef of 'uint32_t' instead of 'int' for the mask argument ↵Craig Topper1-10/+11
for one of the signatures of CreateShuffleVector. This better emphasises that you can't use it for the -1 as undef behavior. llvm-svn: 272491
2016-06-09[X86][AVX512] Dropped avx512 VPSLLDQ/VPSRLDQ intrinsicsSimon Pilgrim1-10/+14
Auto-upgrade to generic shuffles like sse/avx2 implementations now that we can lower to VPSLLDQ/VPSRLDQ llvm-svn: 272308
2016-06-06[AVX512] Remove masked palignr intrinsics and auto-upgrade them to native IR ↵Craig Topper1-0/+54
of vector shuffle and select. llvm-svn: 271872
2016-06-03[X86][XOP] Support for VPERMIL2PD/VPERMIL2PS 2-input shuffle instructionsSimon Pilgrim1-0/+35
This patch begins adding support for lowering to the XOP VPERMIL2PD/VPERMIL2PS shuffle instructions - adding the X86ISD::VPERMIL2 opcode and cleaning up the usage. The internal llvm intrinsics were assuming the shuffle mask operand was the same type as the float/double input operands (I guess to simplify the intrinsic definitions in X86InstrXOP.td to a single value type). These needed changing to integer types (matching the clang builtin and the AMD intrinsics definitions), an auto upgrade path is added to convert old calls. Mask decoding/target shuffle support will be added in future patches. Differential Revision: http://reviews.llvm.org/D20049 llvm-svn: 271633
2016-06-02[X86][SSE] Replace (V)CVTTPS2DQ and VCVTTPD2DQ truncating (round to zero) ↵Simon Pilgrim1-0/+8
f32/f64 to i32 with generic IR (llvm) This patch removes the llvm intrinsics (V)CVTTPS2DQ and VCVTTPD2DQ truncation (round to zero) conversions and auto-upgrades to FP_TO_SINT calls instead. Note: I looked at updating CVTTPD2DQ as well but this still requires a lot more work to correctly lower. Differential Revision: http://reviews.llvm.org/D20860 llvm-svn: 271510
2016-06-02[AVX512] Remove masked load intrinsics. Clang now emits generic masked load ↵Craig Topper1-2/+62
intrinsics instead. The intrinsics will be autoupgraded to the same generic masked loads. llvm-svn: 271478
2016-06-01Revert r271362 "[AVX512] Remove masked load intrinsics. Clang now emits ↵Craig Topper1-62/+2
generic masked load intrinsics instead." Looks like something isn't quite right still. Also forgot to move the test cases to an autoupgrade test. llvm-svn: 271363
2016-06-01[AVX512] Remove masked load intrinsics. Clang now emits generic masked load ↵Craig Topper1-2/+62
intrinsics instead. The intrinsics will be autoupgraded to the same generic masked loads. llvm-svn: 271362
2016-05-31[AVX512] Remove masked store intrinsics. Clang now emits generic masked ↵Craig Topper1-0/+66
store intrinsics instead. The intrinsics will be autoupgraded to the same generic masked stores. llvm-svn: 271245
2016-05-30[X86] Remove SSE/AVX unaligned store intrinsics as clang no longer uses ↵Craig Topper1-0/+17
them. Auto upgrade to native unaligned store instructions. llvm-svn: 271236
2016-05-30[X86] Simplify and remove some unnecessary auto-upgrade code.Craig Topper1-10/+2
llvm-svn: 271233
2016-05-30[X86] Reduce the number of string compares in the autoupgrade logic by ↵Craig Topper1-41/+17
checking more prefixes instead of complete matches. llvm-svn: 271232
2016-05-29[X86] Simplify some of the autoupgrade code. NFCCraig Topper1-61/+38
llvm-svn: 271174
2016-05-28[X86][SSE] (Reapplied) Replace (V)PMOVSX and (V)PMOVZX integer extension ↵Simon Pilgrim1-3/+12
intrinsics with generic IR (llvm) This patch removes the llvm intrinsics VPMOVSX and (V)PMOVZX sign/zero extension intrinsics and auto-upgrades to SEXT/ZEXT calls instead. We already did this for SSE41 PMOVSX sometime ago so much of that implementation can be reused. Reapplied now that the the companion patch (D20684) removes/auto-upgrade the clang intrinsics has been committed. Differential Revision: http://reviews.llvm.org/D20686 llvm-svn: 271131
2016-05-27Revert: r270973 - [X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer ↵Simon Pilgrim1-12/+3
extension intrinsics with generic IR (llvm) llvm-svn: 270976
2016-05-27[X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with ↵Simon Pilgrim1-3/+12
generic IR (llvm) This patch removes the llvm intrinsics VPMOVSX and (V)PMOVZX sign/zero extension intrinsics and auto-upgrades to SEXT/ZEXT calls instead. We already did this for SSE41 PMOVSX sometime ago so much of that implementation can be reused. A companion patch (D20684) removes/auto-upgrade the clang intrinsics. Differential Revision: http://reviews.llvm.org/D20686 llvm-svn: 270973
2016-05-25Objective-C Class Properties: Autoupgrade "Class Properties" module flag.Manman Ren1-0/+31
When we have "Image Info Version" module flag but don't have "Class Properties" module flag, set "Class Properties" module flag to 0, so we can correctly emit errors when one module has the flag set and another module does not. rdar://26469641 llvm-svn: 270791
2016-05-25[X86][SSE] Replace (V)CVTDQ2PD(Y) and (V)CVTPS2PD(Y) lossless conversion ↵Simon Pilgrim1-0/+27
intrinsics with generic IR Followup to D20528 clang patch, this removes the (V)CVTDQ2PD(Y) and (V)CVTPS2PD(Y) llvm intrinsics and auto-upgrades to sitofp/fpext instead. Differential Revision: http://reviews.llvm.org/D20568 llvm-svn: 270678
2016-05-25[X86] Remove the llvm.x86.sse2.storel.dq intrinsic. It hasn't been used in a ↵Craig Topper1-0/+20
long time. llvm-svn: 270677
2016-04-19[AArch64] [ARM] Make a target-independent llvm.thread.pointer intrinsic.Marcin Koscielnicki1-0/+10
Both AArch64 and ARM support llvm.<arch>.thread.pointer intrinsics that just return the thread pointer. I have a pending patch that does the same for SystemZ (D19054), and there are many more targets that could benefit from one. This patch merges the ARM and AArch64 intrinsics into a single target independent one that will also be used by subsequent targets. Differential Revision: http://reviews.llvm.org/D19098 llvm-svn: 266818
2016-04-18try to make comments more meaningful; NFCSanjay Patel1-9/+7
Retry r266541 without the range-based-for-loop-change that was wrong. llvm-svn: 266658
2016-04-17Revert "use range loop, try to make comments more meaningful; NFCI"Duncan P. N. Exon Smith1-7/+10
This reverts commit r266541 since it introduces a use-after-free: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/11471 llvm-svn: 266550
2016-04-16use range loop, try to make comments more meaningful; NFCISanjay Patel1-10/+7
llvm-svn: 266541