1 ; RUN: opt < %s -constprop -S | FileCheck %s
3 %struct = type { i32, [4 x i8] }
4 %array = type [3 x %struct]
7 %A = extractvalue %struct { i32 2, [4 x i8] c"foo\00" }, 0
14 %A = extractvalue %struct { i32 2, [4 x i8] c"foo\00" }, 1, 2
21 %A = extractvalue %array [ %struct { i32 0, [4 x i8] c"aaaa" }, %struct { i32 1, [4 x i8] c"bbbb" }, %struct { i32 2, [4 x i8] c"cccc" } ], 1, 0
27 define i32 @zeroinitializer-test1() {
28 %A = extractvalue %struct zeroinitializer, 0
30 ; CHECK: @zeroinitializer-test1
34 define i8 @zeroinitializer-test2() {
35 %A = extractvalue %struct zeroinitializer, 1, 2
37 ; CHECK: @zeroinitializer-test2
41 define i32 @zeroinitializer-test3() {
42 %A = extractvalue %array zeroinitializer, 1, 0
44 ; CHECK: @zeroinitializer-test3
48 define i32 @undef-test1() {
49 %A = extractvalue %struct undef, 0
52 ; CHECK: ret i32 undef
55 define i8 @undef-test2() {
56 %A = extractvalue %struct undef, 1, 2
62 define i32 @undef-test3() {
63 %A = extractvalue %array undef, 1, 0
66 ; CHECK: ret i32 undef