summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-04 19:10:26 +0000
committerChris Lattner <sabre@nondot.org>2005-05-04 19:10:26 +0000
commit809dfac4218b66087723d1c162c69abbc13abed7 (patch)
tree7416a7bc3334ff4d0faa68e5315637bcea0d468e /llvm/lib/Target/Alpha/AlphaISelPattern.cpp
parent3538a4f6cc6d9913a4fa72bca4cba4f33cf269dc (diff)
downloadbcm5719-llvm-809dfac4218b66087723d1c162c69abbc13abed7.tar.gz
bcm5719-llvm-809dfac4218b66087723d1c162c69abbc13abed7.zip
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
Diffstat (limited to 'llvm/lib/Target/Alpha/AlphaISelPattern.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud