| OLD | NEW |
| 1 ; Tests various aspects of x86 immediate encoding. Some encodings are shorter. | 1 ; Tests various aspects of x86 immediate encoding. Some encodings are shorter. |
| 2 ; For example, the encoding is shorter for 8-bit immediates or when using EAX. | 2 ; For example, the encoding is shorter for 8-bit immediates or when using EAX. |
| 3 ; This assumes that EAX is chosen as the first free register in O2 mode. | 3 ; This assumes that EAX is chosen as the first free register in O2 mode. |
| 4 | 4 |
| 5 ; RUN: %p2i --assemble --disassemble -i %s --args -O2 --verbose none \ | 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s |
| 6 ; RUN: | FileCheck %s | |
| 7 | 6 |
| 8 define internal i32 @testXor8Imm8(i32 %arg) { | 7 define internal i32 @testXor8Imm8(i32 %arg) { |
| 9 entry: | 8 entry: |
| 10 %arg_i8 = trunc i32 %arg to i8 | 9 %arg_i8 = trunc i32 %arg to i8 |
| 11 %result_i8 = xor i8 %arg_i8, 127 | 10 %result_i8 = xor i8 %arg_i8, 127 |
| 12 %result = zext i8 %result_i8 to i32 | 11 %result = zext i8 %result_i8 to i32 |
| 13 ret i32 %result | 12 ret i32 %result |
| 14 } | 13 } |
| 15 ; CHECK-LABEL: testXor8Imm8 | 14 ; CHECK-LABEL: testXor8Imm8 |
| 16 ; CHECK: 34 7f xor al | 15 ; CHECK: 34 7f xor al |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 %r4 = call i64 @llvm.ctlz.i64(i64 %w, i1 false) | 299 %r4 = call i64 @llvm.ctlz.i64(i64 %w, i1 false) |
| 301 %res1 = add i64 %r, %r2 | 300 %res1 = add i64 %r, %r2 |
| 302 %res2 = add i64 %r3, %r4 | 301 %res2 = add i64 %r3, %r4 |
| 303 %res = add i64 %res1, %res2 | 302 %res = add i64 %res1, %res2 |
| 304 ret i64 %res | 303 ret i64 %res |
| 305 } | 304 } |
| 306 ; CHECK-LABEL: test_via_ctlz_64 | 305 ; CHECK-LABEL: test_via_ctlz_64 |
| 307 ; CHECK-DAG: 85 c0 test eax,eax | 306 ; CHECK-DAG: 85 c0 test eax,eax |
| 308 ; CHECK-DAG: 85 db test ebx,ebx | 307 ; CHECK-DAG: 85 db test ebx,ebx |
| 309 ; CHECK-DAG: 85 f6 test esi,esi | 308 ; CHECK-DAG: 85 f6 test esi,esi |
| OLD | NEW |