mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-10 22:46:20 +00:00
add an obvious load folding missed optzn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45161 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2b0e8990ab
commit
4185b52183
@ -1552,3 +1552,24 @@ _foo:
|
|||||||
andl $65535, %eax
|
andl $65535, %eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
We're missing an obvious fold of a load into imul:
|
||||||
|
|
||||||
|
int test(long a, long b) { return a * b; }
|
||||||
|
|
||||||
|
LLVM produces:
|
||||||
|
_test:
|
||||||
|
movl 4(%esp), %ecx
|
||||||
|
movl 8(%esp), %eax
|
||||||
|
imull %ecx, %eax
|
||||||
|
ret
|
||||||
|
|
||||||
|
vs:
|
||||||
|
_test:
|
||||||
|
movl 8(%esp), %eax
|
||||||
|
imull 4(%esp), %eax
|
||||||
|
ret
|
||||||
|
|
||||||
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user