blob: 59aafd1de2330803414bef84463fb03630bfbc12 [file] [log] [blame]
Duncan P. N. Exon Smith15f92a32014-07-29 01:10:57 +00001; RUN: llvm-dis < %s.bc| FileCheck %s
Duncan P. N. Exon Smith13f5c582014-08-19 21:08:27 +00002; RUN: verify-uselistorder < %s.bc
Duncan P. N. Exon Smith15f92a32014-07-29 01:10:57 +00003
4; aggregateOperations.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
5; The test checks that LLVM does not misread instructions with aggregate operands
6; in older bitcode files.
7
8define void @extractvalue([4 x i8] %x1, [4 x [4 x i8]] %x2, {{i32, float}} %x3){
9entry:
10; CHECK: %res1 = extractvalue [4 x i8] %x1, 0
11 %res1 = extractvalue [4 x i8] %x1, 0
12
13; CHECK-NEXT: %res2 = extractvalue [4 x [4 x i8]] %x2, 1
14 %res2 = extractvalue [4 x [4 x i8 ]] %x2, 1
15
16; CHECK-NEXT: %res3 = extractvalue [4 x [4 x i8]] %x2, 0, 1
17 %res3 = extractvalue [4 x [4 x i8 ]] %x2, 0, 1
18
19; CHECK-NEXT: %res4 = extractvalue { { i32, float } } %x3, 0, 1
20 %res4 = extractvalue {{i32, float}} %x3, 0, 1
21
22 ret void
23}
24
25define void @insertvalue([4 x [4 x i8 ]] %x1){
26entry:
27; CHECK: %res1 = insertvalue [4 x [4 x i8]] %x1, i8 0, 0, 0
28 %res1 = insertvalue [4 x [4 x i8 ]] %x1, i8 0, 0, 0
29
30; CHECK-NEXT: %res2 = insertvalue [4 x [4 x i8]] undef, i8 0, 0, 0
31 %res2 = insertvalue [4 x [4 x i8 ]] undef, i8 0, 0, 0
32
33 ret void
34}