llvm-6502/lib/Transforms/Scalar
Chris Lattner 693787a5ec Instcombine: cast (X != 0) to int, cast (X == 1) to int -> X iff X has only the low bit set.
This implements set.ll:test20.

This triggers 2x on povray, 9x on mesa, 11x on gcc, 2x on crafty, 1x on eon,
6x on perlbmk and 11x on m88ksim.

It allows us to compile these two functions into the same code:

struct s { unsigned int bit : 1; };
unsigned foo(struct s *p) {
  if (p->bit)
    return 1;
  else
    return 0;
}
unsigned bar(struct s *p) { return p->bit; }


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21690 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-04 19:10:26 +00:00
..
ADCE.cpp Eliminate tabs and trailing spaces 2005-04-23 21:38:35 +00:00
BasicBlockPlacement.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
CondPropagate.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
ConstantProp.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
CorrelatedExprs.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
DCE.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
DeadStoreElimination.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
GCSE.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
IndVarSimplify.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
InstructionCombining.cpp Instcombine: cast (X != 0) to int, cast (X == 1) to int -> X iff X has only the low bit set. 2005-05-04 19:10:26 +00:00
LICM.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
LoopStrengthReduce.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
LoopUnroll.cpp Eliminate tabs and trailing spaces 2005-04-23 21:38:35 +00:00
LoopUnswitch.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
LowerConstantExprs.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
LowerGC.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
LowerPacked.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
Makefile
PRE.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
Reassociate.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
ScalarReplAggregates.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
SCCP.cpp Eliminate tabs and trailing spaces 2005-04-23 21:38:35 +00:00
SimplifyCFG.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
TailDuplication.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
TailRecursionElimination.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00