OLD | NEW |
1 ; This file checks support for address mode optimization. | 1 ; This file checks support for address mode optimization. |
2 | 2 |
3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ | 3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ |
4 ; RUN: -allow-externally-defined-symbols | FileCheck %s | 4 ; RUN: -allow-externally-defined-symbols | FileCheck %s |
5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 -mattr=sse4.1 \ | 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 -mattr=sse4.1 \ |
6 ; RUN: -allow-externally-defined-symbols | FileCheck --check-prefix=SSE41 %s | 6 ; RUN: -allow-externally-defined-symbols | FileCheck --check-prefix=SSE41 %s |
7 | 7 |
8 define internal float @load_arg_plus_200000(float* %arg) { | 8 define internal float @load_arg_plus_200000(float* %arg) { |
9 entry: | 9 entry: |
10 %arg.int = ptrtoint float* %arg to i32 | 10 %arg.int = ptrtoint float* %arg to i32 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 %arg.int = ptrtoint float* %arg to i32 | 180 %arg.int = ptrtoint float* %arg to i32 |
181 %shl1 = shl i32 %arg.int, 2 | 181 %shl1 = shl i32 %arg.int, 2 |
182 %addr.int = or i32 -1, %shl1 | 182 %addr.int = or i32 -1, %shl1 |
183 %addr.ptr = inttoptr i32 %addr.int to float* | 183 %addr.ptr = inttoptr i32 %addr.int to float* |
184 %addr.load = load float, float* %addr.ptr, align 4 | 184 %addr.load = load float, float* %addr.ptr, align 4 |
185 ret float %addr.load | 185 ret float %addr.load |
186 ; CHECK-LABEL: or_add_boundary_check_2 | 186 ; CHECK-LABEL: or_add_boundary_check_2 |
187 ; CHECK: or | 187 ; CHECK: or |
188 ; CHECK-NOT: movss xmm{{[0-9]+}},DWORD PTR [{{e..}}*4+0xFFFF] | 188 ; CHECK-NOT: movss xmm{{[0-9]+}},DWORD PTR [{{e..}}*4+0xFFFF] |
189 } | 189 } |
| 190 |
| 191 define internal void @invert_icmp(i32* %arg1, i32* %arg2) { |
| 192 entry: |
| 193 %addr.other = load i32, i32* %arg2, align 1 |
| 194 br label %next |
| 195 next: |
| 196 %addr.load = load i32, i32* %arg1, align 1 |
| 197 %cond = icmp slt i32 %addr.load, %addr.other |
| 198 br i1 %cond, label %if.then, label %if.else |
| 199 if.then: |
| 200 ret void |
| 201 if.else: |
| 202 ret void |
| 203 ; CHECK-LABEL: invert_icmp |
| 204 ; CHECK: cmp {{e..}},DWORD PTR [{{e..}}] |
| 205 ; CHECK: jle |
| 206 } |
OLD | NEW |