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