OLD | NEW |
1 ; Test if we can read alloca instructions. | 1 ; Test if we can read alloca instructions. |
2 | 2 |
3 ; RUN: %p2i -i %s --insts | FileCheck %s | 3 ; RUN: %p2i -i %s --insts | FileCheck %s |
| 4 ; RUN: %if --need=allow_disable_ir_gen --command \ |
| 5 ; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \ |
| 6 ; RUN: | %if --need=allow_disable_ir_gen --command \ |
| 7 ; RUN: FileCheck --check-prefix=NOIR %s |
4 | 8 |
5 ; Show examples where size is defined by a constant. | 9 ; Show examples where size is defined by a constant. |
6 | 10 |
7 define i32 @AllocaA0Size1() { | 11 define i32 @AllocaA0Size1() { |
8 entry: | 12 entry: |
9 %array = alloca i8, i32 1 | 13 %array = alloca i8, i32 1 |
10 %addr = ptrtoint i8* %array to i32 | 14 %addr = ptrtoint i8* %array to i32 |
11 ret i32 %addr | 15 ret i32 %addr |
12 | 16 |
13 ; CHECK: entry: | 17 ; CHECK: entry: |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 define i32 @AllocaVarsizeA16(i32 %n) { | 156 define i32 @AllocaVarsizeA16(i32 %n) { |
153 entry: | 157 entry: |
154 %array = alloca i8, i32 %n, align 16 | 158 %array = alloca i8, i32 %n, align 16 |
155 %addr = ptrtoint i8* %array to i32 | 159 %addr = ptrtoint i8* %array to i32 |
156 ret i32 %addr | 160 ret i32 %addr |
157 | 161 |
158 ; CHECK: entry: | 162 ; CHECK: entry: |
159 ; CHECK-NEXT: %array = alloca i8, i32 %n, align 16 | 163 ; CHECK-NEXT: %array = alloca i8, i32 %n, align 16 |
160 ; CHECK-NEXT: ret i32 %array | 164 ; CHECK-NEXT: ret i32 %array |
161 } | 165 } |
| 166 |
| 167 ; NOIR: Total across all functions |
OLD | NEW |