OLD | NEW |
1 ; This tries to be a comprehensive test of f32 and f64 operations. | 1 ; This tries to be a comprehensive test of f32 and f64 operations. |
2 ; The CHECK lines are only checking for basic instruction patterns | 2 ; The CHECK lines are only checking for basic instruction patterns |
3 ; that should be present regardless of the optimization level, so | 3 ; that should be present regardless of the optimization level, so |
4 ; there are no special OPTM1 match lines. | 4 ; there are no special OPTM1 match lines. |
5 | 5 |
6 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s | 6 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s |
7 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s | 7 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s |
8 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 8 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
9 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s | 9 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
10 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ | 10 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 define internal i32 @passFpConstArg(float %a, double %b) { | 53 define internal i32 @passFpConstArg(float %a, double %b) { |
54 entry: | 54 entry: |
55 %call = call i32 @ignoreFpArgsNoInline(float %a, i32 123, double 2.340000e+00) | 55 %call = call i32 @ignoreFpArgsNoInline(float %a, i32 123, double 2.340000e+00) |
56 ret i32 %call | 56 ret i32 %call |
57 } | 57 } |
58 ; CHECK: passFpConstArg: | 58 ; CHECK: passFpConstArg: |
59 ; CHECK: push 123 | 59 ; CHECK: push 123 |
60 ; CHECK: call ignoreFpArgsNoInline | 60 ; CHECK: call ignoreFpArgsNoInline |
61 | 61 |
| 62 define internal i32 @passFp32ConstArg(float %a) { |
| 63 entry: |
| 64 %call = call i32 @ignoreFp32ArgsNoInline(float %a, i32 123, float 2.0) |
| 65 ret i32 %call |
| 66 } |
| 67 ; CHECK: passFp32ConstArg: |
| 68 ; CHECK: push dword |
| 69 ; CHECK: push 123 |
| 70 ; CHECK: call ignoreFp32ArgsNoInline |
| 71 |
| 72 declare i32 @ignoreFp32ArgsNoInline(float, i32, float) |
| 73 |
62 define internal float @returnFloatArg(float %a) { | 74 define internal float @returnFloatArg(float %a) { |
63 entry: | 75 entry: |
64 ret float %a | 76 ret float %a |
65 } | 77 } |
66 ; CHECK: returnFloatArg: | 78 ; CHECK: returnFloatArg: |
67 ; CHECK: fld dword ptr [esp | 79 ; CHECK: fld dword ptr [esp |
68 | 80 |
69 define internal double @returnDoubleArg(double %a) { | 81 define internal double @returnDoubleArg(double %a) { |
70 entry: | 82 entry: |
71 ret double %a | 83 ret double %a |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 %cond = select i1 %cmp, double %a, double %b | 1110 %cond = select i1 %cmp, double %a, double %b |
1099 ret double %cond | 1111 ret double %cond |
1100 } | 1112 } |
1101 ; CHECK: selectDoubleVarVar: | 1113 ; CHECK: selectDoubleVarVar: |
1102 ; CHECK: ucomisd | 1114 ; CHECK: ucomisd |
1103 ; CHECK: ja . | 1115 ; CHECK: ja . |
1104 ; CHECK: fld | 1116 ; CHECK: fld |
1105 | 1117 |
1106 ; ERRORS-NOT: ICE translation error | 1118 ; ERRORS-NOT: ICE translation error |
1107 ; DUMP-NOT: SZ | 1119 ; DUMP-NOT: SZ |
OLD | NEW |