diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-30 06:14:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-30 06:14:02 +0000 |
commit | 33a79cae7cba8b27bd9b4d20ad1ed230be15e4ef (patch) | |
tree | f60779c50eef9b08b26fc97088b643788db0de23 /llvm/lib/CodeGen | |
parent | 3ef3dad1af42d8631f092880f4e53157e27cb59f (diff) | |
download | bcm5719-llvm-33a79cae7cba8b27bd9b4d20ad1ed230be15e4ef.tar.gz bcm5719-llvm-33a79cae7cba8b27bd9b4d20ad1ed230be15e4ef.zip |
Compile:
uint %test(uint %X) {
%Y = call uint %llvm.ctpop.i32(uint %X)
ret uint %Y
}
to:
test:
save -96, %o6, %o6
sll %i0, 0, %l0
popc %l0, %i0
restore %g0, %g0, %g0
retl
nop
instead of to 40 logical ops. Note the shift-by-zero that clears the top
part of the 64-bit V9 register.
Testcase here: CodeGen/SparcV8/ctpop.ll
llvm-svn: 25814
Diffstat (limited to 'llvm/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions