diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-08-06 15:35:32 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-08-06 15:35:32 +0000 |
commit | 55e958746901ef8c04f370e746a7538137d0bcf8 (patch) | |
tree | 2d23220ec2267d39dbb9cdd9e23cb630ee35980c /test/CodeGen | |
parent | e52e9d60456073dddd691ae94c09b790f4bc26d5 (diff) | |
download | external_llvm-55e958746901ef8c04f370e746a7538137d0bcf8.zip external_llvm-55e958746901ef8c04f370e746a7538137d0bcf8.tar.gz external_llvm-55e958746901ef8c04f370e746a7538137d0bcf8.tar.bz2 |
Fix eabi calling convention when a 64 bit value shadows r3.
Without this what was happening was:
* R3 is not marked as "used"
* ARM backend thinks it has to save it to the stack because of vaarg
* Offset computation correctly ignores it
* Offsets are wrong
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110446 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/ARM/arguments.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/arguments.ll b/test/CodeGen/ARM/arguments.ll index 83b4d6e..bb7853e 100644 --- a/test/CodeGen/ARM/arguments.ll +++ b/test/CodeGen/ARM/arguments.ll @@ -24,6 +24,20 @@ entry: ret i32 %.0 } +; test that on gnueabi a 64 bit value at this position will cause r3 to go +; unused and the value stored in [sp] +; ELF: f3: +; ELF: ldr r0, [sp] +; ELF-NEXT: mov pc, lr +; DARWIN: f3: +; DARWIN: mov r0, r3 +; DARWIN-NEXT: mov pc, lr +define i32 @f3(i32 %i, i32 %j, i32 %k, i64 %l, ...) { +entry: + %0 = trunc i64 %l to i32 + ret i32 %0 +} + declare i32 @g1(i64) declare i32 @g2(i32 %i, ...) |