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