OLD | NEW |
(Empty) | |
| 1 ; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcanalyzer -dump-records \ |
| 2 ; RUN: | FileCheck %s |
| 3 |
| 4 ; Test that alloca's size operand is represented with a relative value |
| 5 ; ID, the same as other instructions' operands. |
| 6 |
| 7 define external void @_start(i32 %arg) { |
| 8 ; CHECK: <FUNCTION_BLOCK |
| 9 ; CHECK: </CONSTANTS_BLOCK> |
| 10 |
| 11 %size = mul i32 %arg, 4 |
| 12 ; CHECK-NEXT: <INST_BINOP |
| 13 alloca i8, i32 %size |
| 14 ; CHECK-NEXT: <INST_ALLOCA op0=1 |
| 15 |
| 16 ; Since the operand reference is a relative ID, references to %size |
| 17 ; go up by 1 with each instruction. |
| 18 alloca i8, i32 %size |
| 19 ; CHECK-NEXT: <INST_ALLOCA op0=2 |
| 20 alloca i8, i32 %size |
| 21 ; CHECK-NEXT: <INST_ALLOCA op0=3 |
| 22 |
| 23 ; Reference to a Constant operand. |
| 24 alloca i8, i32 256 |
| 25 ; CHECK-NEXT: <INST_ALLOCA op0=5 |
| 26 |
| 27 ret void |
| 28 ; CHECK-NEXT: <INST_RET/> |
| 29 } |
OLD | NEW |