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