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 -i %s --args -O2 --verbose none \ | 5 ; RUN: %p2i -i %s --args -O2 --verbose none \ |
6 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ | 6 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
7 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s | 7 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s |
8 ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s | 8 ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s |
9 ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s | 9 ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s |
10 | 10 |
11 define internal i32 @testXor8Imm8(i32 %arg) { | 11 define internal i32 @testXor8Imm8(i32 %arg) { |
12 entry: | 12 entry: |
13 %arg_i8 = trunc i32 %arg to i8 | 13 %arg_i8 = trunc i32 %arg to i8 |
14 %result_i8 = xor i8 %arg_i8, 127 | 14 %result_i8 = xor i8 %arg_i8, 127 |
15 %result = zext i8 %result_i8 to i32 | 15 %result = zext i8 %result_i8 to i32 |
16 ret i32 %result | 16 ret i32 %result |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 %res = add i64 %res1, %res2 | 306 %res = add i64 %res1, %res2 |
307 ret i64 %res | 307 ret i64 %res |
308 } | 308 } |
309 ; CHECK-LABEL: test_via_ctlz_64 | 309 ; CHECK-LABEL: test_via_ctlz_64 |
310 ; CHECK-DAG: 85 c0 test eax, eax | 310 ; CHECK-DAG: 85 c0 test eax, eax |
311 ; CHECK-DAG: 85 db test ebx, ebx | 311 ; CHECK-DAG: 85 db test ebx, ebx |
312 ; CHECK-DAG: 85 f6 test esi, esi | 312 ; CHECK-DAG: 85 f6 test esi, esi |
313 | 313 |
314 ; ERRORS-NOT: ICE translation error | 314 ; ERRORS-NOT: ICE translation error |
315 ; DUMP-NOT: SZ | 315 ; DUMP-NOT: SZ |
OLD | NEW |