OLD | NEW |
(Empty) | |
| 1 ; RUIN: %llvm2ice -verbose inst %s | FileCheck %s |
| 2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
| 3 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s |
| 4 |
| 5 |
| 6 define i64 @add_args_i64(i64 %arg1, i64 %arg2) { |
| 7 entry: |
| 8 %add = add i64 %arg2, %arg1 |
| 9 ret i64 %add |
| 10 } |
| 11 |
| 12 ; Checks for verbose instruction output |
| 13 |
| 14 ; CHECK: define i64 @add_args |
| 15 ; CHECK: %add = add i64 %arg2, %arg1 |
| 16 ; CHECK-NEXT: ret i64 %add |
| 17 |
| 18 define i32 @add_args_i32(i32 %arg1, i32 %arg2) { |
| 19 entry: |
| 20 %add = add i32 %arg2, %arg1 |
| 21 ret i32 %add |
| 22 } |
| 23 |
| 24 ; Checks for emitted assembly |
| 25 |
| 26 ; CHECK: .globl add_args_i32 |
| 27 ; CHECK: mov eax, dword ptr [esp+4] |
| 28 ; CHECK-NEXT: mov ecx, dword ptr [esp+8] |
| 29 ; CHECK-NEXT: add ecx, eax |
| 30 ; CHECK-NEXT: mov eax, ecx |
| 31 ; CHECK-NEXT: ret |
| 32 |
| 33 ; ERRORS-NOT: ICE translation error |
| 34 ; DUMP-NOT: SZ |
OLD | NEW |