1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/lib/Transforms
Chris Lattner 1c462db06f 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; }

llvm-svn: 21690
2005-05-04 19:10:26 +00:00
..
Hello Remove trailing whitespace 2005-04-21 23:48:37 +00:00
Instrumentation Eliminate tabs and trailing spaces 2005-04-23 21:38:35 +00:00
IPO Implement the IsDigitOptimization for simplifying calls to the isdigit 2005-05-04 18:58:28 +00:00
Scalar 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
Utils Remove optimizations that don't require both operands to be constant. These 2005-04-29 05:55:35 +00:00
ExprTypeConvert.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
LevelRaise.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
Makefile Change Library Names Not To Conflict With Others When Installed 2004-10-27 23:18:45 +00:00
TransformInternals.cpp Remove trailing whitespace 2005-04-21 23:48:37 +00:00
TransformInternals.h Remove trailing whitespace 2005-04-21 23:48:37 +00:00