OLD | NEW |
1 ; This tries to be a comprehensive test of i8 operations. | 1 ; This tries to be a comprehensive test of i8 operations. |
2 | 2 |
3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s | 3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ |
4 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 | FileCheck %s | 4 ; RUN: -allow-externally-defined-symbols | FileCheck %s |
| 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ |
| 6 ; RUN: -allow-externally-defined-symbols | FileCheck %s |
5 | 7 |
6 declare void @useInt(i32 %x) | 8 declare void @useInt(i32 %x) |
7 | 9 |
8 define internal i32 @add8Bit(i32 %a, i32 %b) { | 10 define internal i32 @add8Bit(i32 %a, i32 %b) { |
9 entry: | 11 entry: |
10 %a_8 = trunc i32 %a to i8 | 12 %a_8 = trunc i32 %a to i8 |
11 %b_8 = trunc i32 %b to i8 | 13 %b_8 = trunc i32 %b to i8 |
12 %add = add i8 %b_8, %a_8 | 14 %add = add i8 %b_8, %a_8 |
13 %ret = zext i8 %add to i32 | 15 %ret = zext i8 %add to i32 |
14 ret i32 %ret | 16 ret i32 %ret |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 ; CHECK: mov BYTE PTR {{.*}},{{[a-d]l}} | 366 ; CHECK: mov BYTE PTR {{.*}},{{[a-d]l}} |
365 | 367 |
366 define void @store_i8_const(i32 %addr_arg) { | 368 define void @store_i8_const(i32 %addr_arg) { |
367 entry: | 369 entry: |
368 %addr = inttoptr i32 %addr_arg to i8* | 370 %addr = inttoptr i32 %addr_arg to i8* |
369 store i8 123, i8* %addr, align 1 | 371 store i8 123, i8* %addr, align 1 |
370 ret void | 372 ret void |
371 } | 373 } |
372 ; CHECK-LABEL: store_i8_const | 374 ; CHECK-LABEL: store_i8_const |
373 ; CHECK: mov BYTE PTR {{.*}},0x7b | 375 ; CHECK: mov BYTE PTR {{.*}},0x7b |
OLD | NEW |