llvm-6502/lib/Transforms/Scalar
Chris Lattner a540623ab1 Fold FP comparisons where one operand is converted from an integer
type and the other operand is a constant into integer comparisons.
This happens surprisingly frequently (e.g. 10 times in 471.omnetpp),
which are things like this:

	%tmp8283 = sitofp i32 %tmp82 to double	
	%tmp1013 = fcmp ult double %tmp8283, 0.0

Clearly comparing tmp82 against i32 0 is cheaper here.

this also triggers 8 times in gobmk, including this one:

	%tmp375376 = sitofp i32 %tmp375 to double
	%tmp377 = fcmp ogt double %tmp375376, 8.150000e+01

which is comparing an integer against 81.5 :).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51268 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-19 20:18:56 +00:00
..
ADCE.cpp Remove ADCE's ability to delete loops. This ability is now implemented in a 2008-05-16 04:34:51 +00:00
BasicBlockPlacement.cpp Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
CodeGenPrepare.cpp API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.) 2008-05-16 19:29:10 +00:00
CondPropagate.cpp Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
ConstantProp.cpp Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
DCE.cpp Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
DeadStoreElimination.cpp 80 col / tabs fixes 2008-05-13 01:48:26 +00:00
GCSE.cpp Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
GVN.cpp Teach GVN to not assert on vector comparisons 2008-05-18 19:49:05 +00:00
GVNPRE.cpp API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.) 2008-05-16 19:29:10 +00:00
IndVarSimplify.cpp API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.) 2008-05-16 19:29:10 +00:00
InstructionCombining.cpp Fold FP comparisons where one operand is converted from an integer 2008-05-19 20:18:56 +00:00
JumpThreading.cpp Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
LICM.cpp Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
LoopDeletion.cpp Clean ups for loop deletion based on Chris' feedback. 2008-05-16 04:32:45 +00:00
LoopIndexSplit.cpp API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.) 2008-05-16 19:29:10 +00:00
LoopRotation.cpp Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better. 2008-05-15 10:04:30 +00:00
LoopStrengthReduce.cpp Fix a bug in LoopStrengthReduce that caused it to emit IR with 2008-05-15 23:26:57 +00:00
LoopUnroll.cpp Bill pointed out that system headers should be 2008-05-16 09:30:00 +00:00
LoopUnswitch.cpp Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00
MemCpyOptimizer.cpp API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.) 2008-05-16 19:29:10 +00:00
PredicateSimplifier.cpp Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
Reassociate.cpp API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.) 2008-05-16 19:29:10 +00:00
Reg2Mem.cpp API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.) 2008-05-16 19:29:10 +00:00
Scalar.cpp C and Objective Caml bindings for mem2reg and reg2mem. 2008-03-20 17:16:03 +00:00
ScalarReplAggregates.cpp API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.) 2008-05-16 19:29:10 +00:00
SCCP.cpp Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
SimplifyCFGPass.cpp rename SimplifyCFG.cpp -> SimplifyCFGPass.cpp 2008-05-14 20:38:44 +00:00
SimplifyLibCalls.cpp Fix PR2341 - when the length is 4 use an i32 not 2008-05-19 09:27:24 +00:00
TailDuplication.cpp Do not dup malloc, vector instructions, etc. Throttle the default theshold way down. 2008-05-16 07:55:50 +00:00
TailRecursionElimination.cpp Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better. 2008-05-15 10:04:30 +00:00