Eli Bendersky | ef4558a | 2013-02-06 20:43:57 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=x86_64-pc-linux -mcpu=corei7 < %s | FileCheck -check-prefix=CORE_LP64 %s |
| 2 | ; RUN: llc -mtriple=x86_64-pc-linux -mcpu=atom < %s | FileCheck -check-prefix=ATOM_LP64 %s |
| 3 | ; RUN: llc -mtriple=x86_64-pc-linux-gnux32 -mcpu=corei7 < %s | FileCheck -check-prefix=CORE_ILP32 %s |
| 4 | ; RUN: llc -mtriple=x86_64-pc-linux-gnux32 -mcpu=atom < %s | FileCheck -check-prefix=ATOM_ILP32 %s |
| 5 | |
| 6 | define i32 @bar(i32 %a) nounwind { |
| 7 | entry: |
| 8 | %arr = alloca [400 x i32], align 16 |
| 9 | |
| 10 | ; There is a 2x2 variation matrix here: |
| 11 | ; Atoms use LEA to update the SP. Opcode bitness depends on data model. |
Eli Bendersky | c66b7b2 | 2013-02-19 17:11:48 +0000 | [diff] [blame] | 12 | ; Cores use sub/add to update the SP. Opcode bitness depends on data model. |
Eli Bendersky | ef4558a | 2013-02-06 20:43:57 +0000 | [diff] [blame] | 13 | |
| 14 | ; CORE_LP64: subq $1608 |
| 15 | ; CORE_ILP32: subl $1608 |
| 16 | ; ATOM_LP64: leaq -1608 |
| 17 | ; ATOM_ILP32: leal -1608 |
| 18 | |
| 19 | %arraydecay = getelementptr inbounds [400 x i32]* %arr, i64 0, i64 0 |
| 20 | %call = call i32 @foo(i32 %a, i32* %arraydecay) nounwind |
| 21 | ret i32 %call |
| 22 | |
| 23 | ; CORE_LP64: addq $1608 |
| 24 | ; CORE_ILP32: addl $1608 |
| 25 | ; ATOM_LP64: leaq 1608 |
| 26 | ; ATOM_ILP32: leal 1608 |
| 27 | |
| 28 | } |
| 29 | |
| 30 | declare i32 @foo(i32, i32*) |
| 31 | |