llvm-6502/test/Transforms
Benjamin Kramer 1db071f0da Teach instcombine to transform
(X >s -1) ? C1 : C2 and (X <s  0) ? C2 : C1
into ((X >>s 31) & (C2 - C1)) + C1, avoiding the conditional.

This optimization could be extended to take non-const C1 and C2 but we better
stay conservative to avoid code size bloat for now.

for
int sel(int n) {
     return n >= 0 ? 60 : 100;
}

we now generate
  sarl  $31, %edi
  andl  $40, %edi
  leal  60(%rdi), %eax

instead of
  testl %edi, %edi
  movl  $60, %ecx
  movl  $100, %eax
  cmovnsl %ecx, %eax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107866 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-08 11:39:10 +00:00
..
ABCD
ADCE
ArgumentPromotion Fix rdar://7879828 - crash in CallGraph, a self host issue. 2010-04-20 00:46:50 +00:00
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge
ConstProp
DeadArgElim Preserve debug info attached with call instruction while eliminating dead argument. 2010-04-30 20:23:54 +00:00
DeadStoreElimination
FunctionAttrs
GlobalDCE
GlobalOpt Use llvm.foo as the intrinsic, rather than llvm.dbg.value. Since the 2010-05-04 20:09:25 +00:00
GVN Remove arm_apcscc from the test files. It is the default and doing this 2010-06-17 15:18:27 +00:00
IndVarSimplify Fix ScalarEvolution's tripcount computation for chains of loops 2010-06-29 23:43:06 +00:00
Inline Fix PR7272: when inlining through a callsite with byval arguments, 2010-05-31 21:00:26 +00:00
InstCombine Teach instcombine to transform 2010-07-08 11:39:10 +00:00
Internalize
IPConstantProp
JumpThreading jump threading can't split a critical edge from an indirectbr. This 2010-06-14 19:45:43 +00:00
LCSSA
LICM
LoopDeletion
LoopIndexSplit Check for side effects before splitting loop. 2010-05-03 18:06:58 +00:00
LoopRotate Fix some tests that didn't test anything. 2010-06-26 20:05:06 +00:00
LoopSimplify
LoopStrengthReduce
LoopUnroll
LoopUnswitch Remove arm_apcscc from the test files. It is the default and doing this 2010-06-17 15:18:27 +00:00
LowerInvoke
LowerSetJmp
LowerSwitch
Mem2Reg Copy location info for current function argument from dbg.declare if respective store instruction does not have any location info. 2010-06-04 22:27:30 +00:00
MemCpyOpt
MergeFunc
PartialSpecialize this test is failing nondeterministically and blaming me, just disable 2010-06-26 22:08:30 +00:00
PruneEH fix some failures my callgraph dump format change broke. 2010-04-23 18:38:40 +00:00
Reassociate
ScalarRepl Fix the second half of PR7437: scalarrepl wasn't preserving 2010-07-08 00:27:05 +00:00
SCCP fix PR6940: sitofp(undef) folds to 0.0, not undef. 2010-04-26 18:21:23 +00:00
SimplifyCFG Test case for r105914. 2010-06-13 16:16:54 +00:00
SimplifyLibCalls Make sure that simplify libcalls does not replace a call with one calling 2010-06-16 19:34:01 +00:00
Sink Add an LLVM IR version of code sinking. This uses the same simple algorithm 2010-05-07 15:40:13 +00:00
SRETPromotion
SSI
StripSymbols Prevent test from hanging waiting for input. 2010-07-01 22:57:11 +00:00
TailCallElim Fix PR7328: when turning a tail recursion into a loop, need to preserve 2010-06-26 12:53:31 +00:00
TailDup