mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
4cae9cb034
We use gep to access the global array "switch.table", and the table index should be treated as unsigned. When the highest bit is 1, this commit zero-extends the index to an integer type with larger size. For a switch on i2, we used to generate: %switch.tableidx = sub i2 %0, -2 getelementptr inbounds [4 x i64]* @switch.table, i32 0, i2 %switch.tableidx It is incorrect when %switch.tableidx is 2 or 3. The fix is to generate %switch.tableidx = sub i2 %0, -2 %switch.tableidx.zext = zext i2 %switch.tableidx to i3 getelementptr inbounds [4 x i64]* @switch.table, i32 0, i3 %switch.tableidx.zext rdar://17735071 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213815 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
ADCE | ||
AddDiscriminators | ||
ArgumentPromotion | ||
AtomicExpandLoadLinked/ARM | ||
BBVectorize | ||
BranchFolding | ||
CodeExtractor | ||
CodeGenPrepare | ||
ConstantHoisting | ||
ConstantMerge | ||
ConstProp | ||
CorrelatedValuePropagation | ||
DeadArgElim | ||
DeadStoreElimination | ||
DebugIR | ||
EarlyCSE | ||
FunctionAttrs | ||
GCOVProfiling | ||
GlobalDCE | ||
GlobalOpt | ||
GVN | ||
IndVarSimplify | ||
Inline | ||
InstCombine | ||
InstMerge | ||
InstSimplify | ||
Internalize | ||
IPConstantProp | ||
JumpThreading | ||
LCSSA | ||
LICM | ||
LoadCombine | ||
LoopDeletion | ||
LoopIdiom | ||
LoopReroll | ||
LoopRotate | ||
LoopSimplify | ||
LoopStrengthReduce | ||
LoopUnroll | ||
LoopUnswitch | ||
LoopVectorize | ||
LowerAtomic | ||
LowerExpectIntrinsic | ||
LowerInvoke | ||
LowerSwitch | ||
Mem2Reg | ||
MemCpyOpt | ||
MergeFunc | ||
MetaRenamer | ||
ObjCARC | ||
PhaseOrdering | ||
PruneEH | ||
Reassociate | ||
Reg2Mem | ||
SampleProfile | ||
Scalarizer | ||
ScalarRepl | ||
SCCP | ||
SeparateConstOffsetFromGEP/NVPTX | ||
SimplifyCFG | ||
Sink | ||
SLPVectorizer | ||
SROA | ||
StripSymbols | ||
StructurizeCFG | ||
TailCallElim | ||
TailDup |