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 \ | 4 ; RUN: %p2i -i %s --args -notranslate -timing | \ |
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 | 5 ; RUN: FileCheck --check-prefix=NOIR %s |
8 | 6 |
9 ; Show examples where size is defined by a constant. | 7 ; Show examples where size is defined by a constant. |
10 | 8 |
11 define internal i32 @AllocaA0Size1() { | 9 define internal i32 @AllocaA0Size1() { |
12 entry: | 10 entry: |
13 %array = alloca i8, i32 1 | 11 %array = alloca i8, i32 1 |
14 %addr = ptrtoint i8* %array to i32 | 12 %addr = ptrtoint i8* %array to i32 |
15 ret i32 %addr | 13 ret i32 %addr |
16 | 14 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 %array = alloca i8, i32 %n, align 16 | 156 %array = alloca i8, i32 %n, align 16 |
159 %addr = ptrtoint i8* %array to i32 | 157 %addr = ptrtoint i8* %array to i32 |
160 ret i32 %addr | 158 ret i32 %addr |
161 | 159 |
162 ; CHECK: entry: | 160 ; CHECK: entry: |
163 ; CHECK-NEXT: %array = alloca i8, i32 %n, align 16 | 161 ; CHECK-NEXT: %array = alloca i8, i32 %n, align 16 |
164 ; CHECK-NEXT: ret i32 %array | 162 ; CHECK-NEXT: ret i32 %array |
165 } | 163 } |
166 | 164 |
167 ; NOIR: Total across all functions | 165 ; NOIR: Total across all functions |
OLD | NEW |