diff options
author | Chris Lattner <sabre@nondot.org> | 2007-07-16 05:43:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-07-16 05:43:05 +0000 |
commit | 651f0e9c8f324615dd81c83e4cf0043b2488a628 (patch) | |
tree | 9e482ffed913143496a50090eca085ef7fb3826f /llvm/lib/Support/SmallPtrSet.cpp | |
parent | f57999dcb18eb72da136b5cdbbc84b60a79cf2ba (diff) | |
download | llvm-651f0e9c8f324615dd81c83e4cf0043b2488a628.zip llvm-651f0e9c8f324615dd81c83e4cf0043b2488a628.tar.gz llvm-651f0e9c8f324615dd81c83e4cf0043b2488a628.tar.bz2 |
Add a hack (mirroring llvm-gcc) to pointer difference
codegen to compile:
int test(int *A, int *B) {
return A-B;
}
into:
_test:
movl 4(%esp), %eax
subl 8(%esp), %eax
sarl $2, %eax
ret
instead of:
_test:
movl 4(%esp), %eax
subl 8(%esp), %eax
movl %eax, %ecx
sarl $31, %ecx
shrl $30, %ecx
addl %ecx, %eax
sarl $2, %eax
ret
llvm-svn: 39902
Diffstat (limited to 'llvm/lib/Support/SmallPtrSet.cpp')
0 files changed, 0 insertions, 0 deletions