llvm/test/Transforms
Craig Topper 1bc52fbec6 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311508 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-22 23:40:15 +00:00
..
ADCE [ADCE][Dominators] Reapply: Teach ADCE to preserve dominators 2017-08-22 16:30:21 +00:00
AddDiscriminators
AlignmentFromAssumptions
ArgumentPromotion [ArgPromotion] Preserve alignment of byval argument in new alloca 2017-08-04 17:09:11 +00:00
AtomicExpand
BDCE [BDCE] Don't check demanded bits on unsized types 2017-08-16 16:09:22 +00:00
BranchFolding
CodeExtractor Clean up a test case 2017-06-27 21:35:49 +00:00
CodeGenPrepare [CGP] Fix the rematerialization of gc.relocates 2017-08-17 05:48:30 +00:00
ConstantHoisting [ConstantHoisting] Remove dupliate logic in constant hoisting 2017-07-10 20:45:34 +00:00
ConstantMerge
ConstProp [X86] Replace 'REQUIRES: x86' in tests with 'REQUIRES: x86-registered-target' which seems to be the correct way to make them run on an x86 build. 2017-06-04 08:21:58 +00:00
Coroutines Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
CorrelatedValuePropagation [LVI] Constant-propagate a zero extension of the switch condition value through case edges 2017-08-03 21:11:30 +00:00
CountingFunctionInserter
CrossDSOCFI [cfi] CFI-ICall for ThinLTO. 2017-06-16 00:18:29 +00:00
DCE Add strictfp attribute to prevent unwanted optimizations of libm calls 2017-08-14 21:15:13 +00:00
DeadArgElim Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
DeadStoreElimination Revert r310055, it caused PR34074. 2017-08-04 20:40:38 +00:00
EarlyCSE [EarlyCSE] Handle calls with no MemorySSA info. 2017-07-14 20:13:21 +00:00
EliminateAvailableExternally
Float2Int
ForcedFunctionAttrs
FunctionAttrs
FunctionImport Fix bot failures by requiring x86 target 2017-08-19 19:15:04 +00:00
GCOVProfiling [llvm] Get rid of "%T" expansions 2017-08-15 20:29:24 +00:00
GlobalDCE [PM] Teach the PGO instrumentation pasess to run GlobalDCE before 2017-05-25 07:15:09 +00:00
GlobalMerge [DI] Every DIGlobalVariable should have a type. 2017-08-16 13:39:07 +00:00
GlobalOpt Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
GlobalSplit
GuardWidening
GVN Keep Optimization Remark Yaml in NewPM 2017-08-20 01:30:45 +00:00
GVNHoist
GVNSink Changed a comparison operator for std::stable_sort to implement strict weak ordering. 2017-06-08 17:27:40 +00:00
IndVarSimplify [SCEV/IndVars] Always compute loop exiting values if the backedge count is 0 2017-08-01 22:37:58 +00:00
InferAddressSpaces [InferAddressSpaces] Fix assertion about null pointer 2017-07-07 02:40:13 +00:00
InferFunctionAttrs Add argmononly attribute to strlen and wcslen, i.e. they only read memory (string) passed to them. 2017-06-18 03:10:26 +00:00
Inline Emit only A Single Opt Remark When Inlining 2017-08-21 16:45:47 +00:00
InstCombine [InstCombine] Remove check for sext of vector icmp from shouldOptimizeCast 2017-08-22 23:40:15 +00:00
InstMerge
InstNamer
InstSimplify [InstSimplify] Teach decomposeBitTestICmp to handle non-canonical compares 2017-08-14 22:11:43 +00:00
InterleavedAccess [InterLeaved] Adding lit test for future work interleaved load strid 3 2017-08-21 08:56:39 +00:00
Internalize
IPConstantProp
IRCE [IRCE] Fix buggy behavior in Clamp 2017-08-18 22:50:29 +00:00
JumpThreading Revert 311208, 311209 2017-08-21 16:00:38 +00:00
LCSSA
LICM Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
LoadStoreVectorizer
LoopDataPrefetch
LoopDeletion [Dominators] Teach LoopDeletion to use the new incremental API 2017-08-02 18:17:52 +00:00
LoopDistribute
LoopIdiom Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
LoopInterchange [LoopInterchange] Do not interchange loops with function calls. 2017-07-31 09:00:52 +00:00
LoopLoadElim
LoopPredication
LoopReroll Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
LoopRotate Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
LoopSimplify Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
LoopSimplifyCFG
LoopStrengthReduce Reapply fix PR23384 (part 3 of 3) r304824 (was reverted in r305720). 2017-08-07 19:56:34 +00:00
LoopUnroll Changed basic cost of store operation on X86 2017-08-20 12:34:29 +00:00
LoopUnswitch Add "REQUIRES: asserts" for test unswitch-equality-undef.ll. 2017-07-26 01:34:46 +00:00
LoopVectorize Revert r311077: [LV] Using VPlan ... 2017-08-20 23:17:11 +00:00
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerExpectIntrinsic Fix builin_expect lowering bug 2017-06-07 18:32:24 +00:00
LowerGuardIntrinsic
LowerInvoke
LowerSwitch
LowerTypeTests Update phi nodes in LowerTypeTests control flow simplification 2017-07-31 20:43:07 +00:00
Mem2Reg Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
MemCpyOpt
MergeFunc Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
MetaRenamer [MetaRenamer] Leave @main alone. 2017-08-01 05:14:45 +00:00
NameAnonGlobals
NaryReassociate
NewGVN Keep Optimization Remark Yaml in NewPM 2017-08-20 01:30:45 +00:00
ObjCARC Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
PartiallyInlineLibCalls
PGOProfile Keep Optimization Remark Yaml in NewPM 2017-08-20 01:30:45 +00:00
PhaseOrdering
PlaceSafepoints All libcalls should be considered to be GC-leaf functions. 2017-07-27 16:49:39 +00:00
PreISelIntrinsicLowering
PruneEH
Reassociate [Reassociate] Make sure EraseInst sets MadeChange 2017-06-27 05:32:13 +00:00
Reg2Mem
RewriteStatepointsForGC All libcalls should be considered to be GC-leaf functions. 2017-07-27 16:49:39 +00:00
SafeStack Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
SampleProfile Keep Optimization Remark Yaml in NewPM 2017-08-20 01:30:45 +00:00
Scalarizer Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
SCCP [IPSCCP] Guard a user of getInitializer with hasDefinitiveInitializer 2017-07-31 17:47:07 +00:00
SeparateConstOffsetFromGEP
SimpleLoopUnswitch [PM/Unswitch] Fix a bug in the domtree update logic for the new unswitch 2017-05-25 06:33:36 +00:00
SimplifyCFG [SimplifyCFG] Add a test for preserve store alignment, NFC. 2017-08-17 17:26:52 +00:00
Sink Enhance synchscope representation 2017-07-11 22:23:00 +00:00
SLPVectorizer Keep Optimization Remark Yaml in NewPM 2017-08-20 01:30:45 +00:00
SpeculativeExecution
SROA Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
StructurizeCFG [Dominators] Include infinite loops in PostDominatorTree 2017-08-15 18:14:57 +00:00
TailCallElim [TRE] Add another test for OptRemark. 2017-07-19 21:39:51 +00:00
ThinLTOBitcodeWriter ThinLTO Minimized Bitcode File Size Reduction 2017-07-21 17:25:20 +00:00
Util Keep Optimization Remark Yaml in NewPM 2017-08-20 01:30:45 +00:00
WholeProgramDevirt WholeProgramDevirt: Create bitcast to i8* at each virtual call site. 2017-08-22 21:41:19 +00:00