llvm-6502/test/Transforms
Chris Lattner 7312a22ed6 enhance the "change or icmp's into switch" xform to handle one value in an
'or sequence' that it doesn't understand.  This allows us to optimize
something insane like this:

int crud (unsigned char c, unsigned x)
 {
   if(((((((((( (int) c <= 32 ||
                    (int) c == 46) || (int) c == 44)
                  || (int) c == 58) || (int) c == 59) || (int) c == 60)
               || (int) c == 62) || (int) c == 34) || (int) c == 92)
            || (int) c == 39) != 0)
     foo();
 }

into:

define i32 @crud(i8 zeroext %c, i32 %x) nounwind ssp noredzone {
entry:
  %cmp = icmp ult i8 %c, 33
  br i1 %cmp, label %if.then, label %switch.early.test

switch.early.test:                                ; preds = %entry
  switch i8 %c, label %if.end [
    i8 39, label %if.then
    i8 44, label %if.then
    i8 58, label %if.then
    i8 59, label %if.then
    i8 60, label %if.then
    i8 62, label %if.then
    i8 46, label %if.then
    i8 92, label %if.then
    i8 34, label %if.then
  ]

by pulling the < comparison out ahead of the newly formed switch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121680 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-13 04:50:38 +00:00
..
ADCE
ArgumentPromotion Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare Add a test for CodeGenPrepare's ability to look through PHI nodes when performing 2010-11-19 22:34:53 +00:00
ConstantMerge fix PR8144, a bug where constant merge would merge globals marked 2010-09-15 00:30:11 +00:00
ConstProp Teach ConstantFoldInstruction() how to fold insertvalue and extractvalue. 2010-11-29 20:36:52 +00:00
CorrelatedValuePropagation Update testcase since we're no longer doing the constant forwarding inline with correlated value propagation. 2010-10-29 21:18:23 +00:00
DeadArgElim
DeadStoreElimination Fix PR8728, a miscompilation I recently introduced. When optimizing 2010-12-06 01:48:06 +00:00
FunctionAttrs Make ModRefBehavior a lattice. Use this to clean up AliasAnalysis 2010-11-10 01:02:18 +00:00
GlobalDCE
GlobalOpt reapply r121100 with a tweak to constant fold ConstExprs with TargetData 2010-12-07 04:33:29 +00:00
GVN Completely rework the datastructure GVN uses to represent the value number to leader mapping. Previously, 2010-11-18 18:32:40 +00:00
IndVarSimplify Remove LoopIndexSplit pass. It is neither maintained nor used by anyone. 2010-10-07 23:29:37 +00:00
Inline Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
InstCombine Generalize the and-icmp-select instcombine further by allowing selects of the form 2010-12-11 10:49:22 +00:00
Internalize
IPConstantProp
JumpThreading Implement jump threading of 'indirectbr' by keeping track of whether we're looking for ConstantInt*s or BlockAddress*s. 2010-12-06 23:36:56 +00:00
LCSSA
LICM Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
LoopDeletion
LoopRotate Teach loop rotate to hoist trivially invariant instructions 2010-09-06 01:10:22 +00:00
LoopSimplify Fix LoopSimplify to notify ScalarEvolution when splitting a loop backedge 2010-09-04 02:42:48 +00:00
LoopStrengthReduce
LoopUnroll Revert r113439, which relaxed the requirement that loops containing calls cannot be unrolled. After some discussion, 2010-09-09 20:02:23 +00:00
LoopUnswitch Factor code for testing whether replacing one value with another 2010-11-18 19:59:41 +00:00
LowerAtomic
LowerInvoke
LowerSetJmp
LowerSwitch
Mem2Reg
MemCpyOpt enhance memcpyopt to zap memcpy's that have the same src/dst. 2010-12-09 07:45:45 +00:00
MergeFunc
PartialSpecialize Now using a variant of the existing inlining heuristics to decide whether to create a given specialization of a function in PartialSpecialization. If the total performance bonus across all callsites passing the same constant exceeds the specialization cost, we create the specialization. 2010-10-09 22:06:36 +00:00
PruneEH
Reassociate
ScalarRepl Treat a call of function pointer like a load of the pointer when considering 2010-11-24 22:04:20 +00:00
SCCP
SimplifyCFG enhance the "change or icmp's into switch" xform to handle one value in an 2010-12-13 04:50:38 +00:00
SimplifyLibCalls Add a puts optimization that converts puts() to putchar('\n'). 2010-11-30 06:19:18 +00:00
Sink Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
SRETPromotion
StripSymbols
TailCallElim
TailDup