llvm-6502/test/Transforms
Benjamin Kramer 0baa94a13b InstCombine: Turn icmp + sext into bitwise/integer ops when the input has only one unknown bit.
int test1(unsigned x) { return (x&8) ? 0 : -1; }
int test3(unsigned x) { return (x&8) ? -1 : 0; }

before (x86_64):
_test1:
	andl	$8, %edi
	cmpl	$1, %edi
	sbbl	%eax, %eax
	ret
_test3:
	andl	$8, %edi
	cmpl	$1, %edi
	sbbl	%eax, %eax
	notl	%eax
	ret

after:
_test1:
	shrl	$3, %edi
	andl	$1, %edi
	leal	-1(%rdi), %eax
	ret
_test3:
	shll	$28, %edi
	movl	%edi, %eax
	sarl	$31, %eax
	ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128732 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-01 20:09:10 +00:00
..
ADCE
ArgumentPromotion
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge
ConstProp Constant folding support for calls to umul.with.overflow(), basically identical to the smul.with.overflow() code. 2011-03-27 14:26:13 +00:00
CorrelatedValuePropagation
DeadArgElim
DeadStoreElimination * The DSE code that tested for overlapping needed to take into account the fact 2011-03-30 21:37:19 +00:00
EarlyCSE
FunctionAttrs
GlobalDCE
GlobalOpt Add an optimization to GlobalOpt that eliminates calls to __cxa_atexit, if the function passed is empty. 2011-03-20 17:59:11 +00:00
GVN
IndVarSimplify Avoid creating canonical induction variables for non-native types. 2011-03-18 16:50:32 +00:00
Inline
InstCombine InstCombine: Turn icmp + sext into bitwise/integer ops when the input has only one unknown bit. 2011-04-01 20:09:10 +00:00
InstSimplify
Internalize
IPConstantProp
JumpThreading
LCSSA Do not add PHIs with no users when creating LCSSA form. Patch by Andrew Clinton. 2011-03-15 07:41:25 +00:00
LICM
LoopDeletion
LoopIdiom
LoopRotate
LoopSimplify Avoid creating canonical induction variables for non-native types. 2011-03-18 16:50:32 +00:00
LoopStrengthReduce Avoid creating canonical induction variables for non-native types. 2011-03-18 16:50:32 +00:00
LoopUnroll
LoopUnswitch
LowerAtomic
LowerInvoke
LowerSetJmp
LowerSwitch
Mem2Reg
MemCpyOpt
MergeFunc
PruneEH
Reassociate
ScalarRepl Do some simple copy propagation through integer loads and stores when promoting 2011-03-29 05:19:52 +00:00
SCCP
SimplifyCFG PR9450: Make switch optimization in SimplifyCFG not dependent on the ordering 2011-03-15 02:23:35 +00:00
SimplifyLibCalls
Sink
SRETPromotion
StripSymbols
TailCallElim
TailDup