mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 12:50:00 +00:00
add a testcase for a feature we regressed on because noone wrote the test! :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23513 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d8ead9e250
commit
3a972c2951
14
test/CodeGen/PowerPC/fold-li.ll
Normal file
14
test/CodeGen/PowerPC/fold-li.ll
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
; RUN: llvm-as < %s | llc -march=ppc32 &&
|
||||||
|
; RUN: llvm-as < %s | llc -march=ppc32 | grep -v align | not grep li
|
||||||
|
|
||||||
|
;; Test that immediates are folded into these instructions correctly.
|
||||||
|
|
||||||
|
int %ADD(int %X) {
|
||||||
|
%Y = add int %X, 65537
|
||||||
|
ret int %Y
|
||||||
|
}
|
||||||
|
|
||||||
|
int %SUB(int %X) {
|
||||||
|
%Y = sub int %X, 65537
|
||||||
|
ret int %Y
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user