| OLD | NEW |
| 1 ; Test of multiple indirect calls to the same target. Each call | 1 ; Test of multiple indirect calls to the same target. Each call |
| 2 ; should be to the same operand, whether it's in a register or on the | 2 ; should be to the same operand, whether it's in a register or on the |
| 3 ; stack. | 3 ; stack. |
| 4 | 4 |
| 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ | 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ |
| 6 ; RUN: | FileCheck %s | 6 ; RUN: | FileCheck %s |
| 7 ; RUN: %if --need=allow_dump --command %p2i --filetype=asm --assemble \ | 7 ; RUN: %if --need=allow_dump --command %p2i --filetype=asm --assemble \ |
| 8 ; RUN: --disassemble -i %s --args -O2 \ | 8 ; RUN: --disassemble -i %s --args -O2 \ |
| 9 ; RUN: | %if --need=allow_dump --command FileCheck %s | 9 ; RUN: | %if --need=allow_dump --command FileCheck %s |
| 10 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ | 10 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 ; OPTM1: call [[TARGET]] | 37 ; OPTM1: call [[TARGET]] |
| 38 ; OPTM1: call [[TARGET]] | 38 ; OPTM1: call [[TARGET]] |
| 39 ; OPTM1: call [[TARGET]] | 39 ; OPTM1: call [[TARGET]] |
| 40 ; OPTM1: call [[TARGET]] | 40 ; OPTM1: call [[TARGET]] |
| 41 | 41 |
| 42 @fp_v = internal global [4 x i8] zeroinitializer, align 4 | 42 @fp_v = internal global [4 x i8] zeroinitializer, align 4 |
| 43 | 43 |
| 44 define internal void @CallIndirectGlobal() { | 44 define internal void @CallIndirectGlobal() { |
| 45 entry: | 45 entry: |
| 46 %fp_ptr_i32 = bitcast [4 x i8]* @fp_v to i32* | 46 %fp_ptr_i32 = bitcast [4 x i8]* @fp_v to i32* |
| 47 %fp_ptr = load i32* %fp_ptr_i32, align 1 | 47 %fp_ptr = load i32, i32* %fp_ptr_i32, align 1 |
| 48 %fp = inttoptr i32 %fp_ptr to void ()* | 48 %fp = inttoptr i32 %fp_ptr to void ()* |
| 49 call void %fp() | 49 call void %fp() |
| 50 call void %fp() | 50 call void %fp() |
| 51 call void %fp() | 51 call void %fp() |
| 52 call void %fp() | 52 call void %fp() |
| 53 ret void | 53 ret void |
| 54 } | 54 } |
| 55 ; CHECK-LABEL: CallIndirectGlobal | 55 ; CHECK-LABEL: CallIndirectGlobal |
| 56 ; CHECK: call [[REGISTER:[a-z]+]] | 56 ; CHECK: call [[REGISTER:[a-z]+]] |
| 57 ; CHECK: call [[REGISTER]] | 57 ; CHECK: call [[REGISTER]] |
| (...skipping 20 matching lines...) Expand all Loading... |
| 78 | 78 |
| 79 ; CHECK-LABEL: CallConst | 79 ; CHECK-LABEL: CallConst |
| 80 ; CHECK: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* | 80 ; CHECK: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* |
| 81 ; CHECK: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* | 81 ; CHECK: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* |
| 82 ; CHECK: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* | 82 ; CHECK: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* |
| 83 ; | 83 ; |
| 84 ; OPTM1-LABEL: CallConst | 84 ; OPTM1-LABEL: CallConst |
| 85 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* | 85 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* |
| 86 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* | 86 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* |
| 87 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* | 87 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* |
| OLD | NEW |