diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-04-09 21:43:54 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-04-09 21:43:54 +0000 |
| commit | da504741da1ffef8386ba281520d72f0b4e5983f (patch) | |
| tree | 00f1bcc677a3232ac84481ed7821400e1c7bba8f /llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp | |
| parent | e8e070dbfba00e7875d4bcd2587b0cb7ad26e782 (diff) | |
| download | bcm5719-llvm-da504741da1ffef8386ba281520d72f0b4e5983f.tar.gz bcm5719-llvm-da504741da1ffef8386ba281520d72f0b4e5983f.zip | |
add a little peephole optimization. This allows us to codegen:
int a(short i) {
return i & 1;
}
as
_a:
andi. r3, r3, 1
blr
instead of:
_a:
rlwinm r2, r3, 0, 16, 31
andi. r3, r2, 1
blr
on ppc. It should also help the other risc targets.
llvm-svn: 21189
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp')
0 files changed, 0 insertions, 0 deletions

