llvm-6502/test/Transforms
Hans Wennborg 09a31f3154 Allow switch-to-lookup table for tables with holes by adding bitmask check
This allows us to generate table lookups for code such as:

  unsigned test(unsigned x) {
    switch (x) {
      case 100: return 0;
      case 101: return 1;
      case 103: return 2;
      case 105: return 3;
      case 107: return 4;
      case 109: return 5;
      case 110: return 6;
      default: return f(x);
    }
  }

Since cases 102, 104, etc. are not constants, the lookup table has holes
in those positions. We therefore guard the table lookup with a bitmask check.

Patch by Jasper Neumann!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203694 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 18:35:40 +00:00
..
ADCE
AddDiscriminators
ArgumentPromotion
BBVectorize
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantHoisting/X86
ConstantMerge
ConstProp
CorrelatedValuePropagation
DeadArgElim
DeadStoreElimination
DebugIR
EarlyCSE
FunctionAttrs
GCOVProfiling
GlobalDCE
GlobalOpt
GVN Fix crash in PRE. 2014-03-11 15:07:32 +00:00
IndVarSimplify
Inline
InstCombine Revert r203488 and r203520. 2014-03-12 18:09:37 +00:00
InstSimplify
Internalize
IPConstantProp
JumpThreading
LCSSA
LICM
LoopDeletion
LoopIdiom
LoopReroll
LoopRotate
LoopSimplify
LoopStrengthReduce
LoopUnroll
LoopUnswitch
LoopVectorize
LowerAtomic IR: add a second ordering operand to cmpxhg for failure 2014-03-11 10:48:52 +00:00
LowerExpectIntrinsic
LowerInvoke
LowerSwitch
Mem2Reg
MemCpyOpt
MergeFunc
MetaRenamer
ObjCARC
PhaseOrdering
PruneEH
Reassociate
Reg2Mem
SampleProfile Use discriminator information in sample profiles. 2014-03-10 22:41:28 +00:00
Scalarizer
ScalarRepl
SCCP
SimplifyCFG Allow switch-to-lookup table for tables with holes by adding bitmask check 2014-03-12 18:35:40 +00:00
Sink
SLPVectorizer
SROA
StripSymbols
StructurizeCFG
TailCallElim
TailDup