1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/Transforms/InstCombine
Craig Topper fe80694ff0 [InstCombine] Remove check for sext of vector icmp from shouldOptimizeCast
Looks like for 'and' and 'or' we end up performing at least some of the transformations this is bocking in a round about way anyway.

For 'and sext(cmp1), sext(cmp2) we end up later turning it into 'select cmp1, sext(cmp2), 0'. Then we optimize that back to sext (and cmp1, cmp2). This is the same result we would have gotten if shouldOptimizeCast hadn't blocked it. We do something analogous for 'or'.

With this patch we allow that transformation to happen directly in foldCastedBitwiseLogic. And we now support the same thing for 'xor'. This is definitely opening up many other cases, but since we already went around it for some cases hopefully it's ok.

Differential Revision: https://reviews.llvm.org/D36213

llvm-svn: 311508
2017-08-22 23:40:15 +00:00
..
CMakeLists.txt
InstCombineAddSub.cpp [InstCombine] Simplify pointer difference subtractions (GEP-GEP) where GEPs have other uses and one non-constant index 2017-07-27 18:27:11 +00:00
InstCombineAndOrXor.cpp [InstCombine] Remove check for sext of vector icmp from shouldOptimizeCast 2017-08-22 23:40:15 +00:00
InstCombineCalls.cpp [X86][InstCombine] Add some simplifications for BZHI intrinsics 2017-07-31 18:52:15 +00:00
InstCombineCasts.cpp [InstCombine] Fix a weakness in canEvaluateZExtd around 'and' instructions 2017-08-21 16:04:11 +00:00
InstCombineCompares.cpp Remove checks for debug info intrinsics in use lists, NFC 2017-08-14 22:10:54 +00:00
InstCombineInternal.h Remove checks for debug info intrinsics in use lists, NFC 2017-08-14 22:10:54 +00:00
InstCombineLoadStoreAlloca.cpp Fix DebugLoc propagation for unreachable LoadInst 2017-07-19 01:27:24 +00:00
InstCombineMulDivRem.cpp [IR] Add Type::isIntOrIntVectorTy(unsigned) similar to the existing isIntegerTy(unsigned), but also works for vectors. 2017-07-09 07:04:03 +00:00
InstCombinePHI.cpp fix typos in comments; NFC 2017-07-11 06:04:59 +00:00
InstCombineSelect.cpp [InstCombine] Teach foldSelectICmpAnd to recognize a (icmp slt X, 0) and (icmp sgt X, -1) as equivalent to an and with the sign bit of the truncated type 2017-08-21 19:02:06 +00:00
InstCombineShifts.cpp [InstCombine] Added support for (X >>s C) << C --> X & (-1 << C) 2017-08-15 19:33:14 +00:00
InstCombineSimplifyDemanded.cpp [InstCombine] Remove unnecessary temporary APInt. NFCI 2017-08-02 21:05:40 +00:00
InstCombineVectorOps.cpp [InstCombine] Make InstCombine's IRBuilder be passed by reference everywhere 2017-07-07 23:16:26 +00:00
InstructionCombining.cpp Remove checks for debug info intrinsics in use lists, NFC 2017-08-14 22:10:54 +00:00
LLVMBuild.txt