1 ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
2 ; RUN: verify-uselistorder %s
6 ; CHECK-NEXT: extractvalue
7 ; CHECK-NEXT: insertvalue
10 define float @foo({{i32},{float, double}}* %p) nounwind {
11 %t = load {{i32},{float, double}}, {{i32},{float, double}}* %p
12 %s = extractvalue {{i32},{float, double}} %t, 1, 0
13 %r = insertvalue {{i32},{float, double}} %t, double 2.0, 1, 1
14 store {{i32},{float, double}} %r, {{i32},{float, double}}* %p
19 ; CHECK-NEXT: store { { i32 }, { float, double } } { { i32 } { i32 4 }, { float, double } { float 4.000000e+00, double 2.000000e+01 } }, { { i32 }, { float, double } }* %p
20 ; CHECK-NEXT: ret float 7.000000e+00
21 define float @bar({{i32},{float, double}}* %p) nounwind {
22 store {{i32},{float, double}} insertvalue ({{i32},{float, double}}{{i32}{i32 4},{float, double}{float 4.0, double 5.0}}, double 20.0, 1, 1), {{i32},{float, double}}* %p
23 ret float extractvalue ({{i32},{float, double}}{{i32}{i32 3},{float, double}{float 7.0, double 9.0}}, 1, 0)
27 ; CHECK-NEXT: store { { i32 }, { float, double } } { { i32 } undef, { float, double } { float undef, double 2.000000e+01 } }, { { i32 }, { float, double } }* %p
28 ; CHECK-NEXT: ret float undef
29 define float @car({{i32},{float, double}}* %p) nounwind {
30 store {{i32},{float, double}} insertvalue ({{i32},{float, double}} undef, double 20.0, 1, 1), {{i32},{float, double}}* %p
31 ret float extractvalue ({{i32},{float, double}} undef, 1, 0)
35 ; CHECK-NEXT: store { { i32 }, { float, double } } { { i32 } zeroinitializer, { float, double } { float 0.000000e+00, double 2.000000e+01 } }, { { i32 }, { float, double } }* %p
36 ; CHECK-NEXT: ret float 0.000000e+00
37 define float @dar({{i32},{float, double}}* %p) nounwind {
38 store {{i32},{float, double}} insertvalue ({{i32},{float, double}} zeroinitializer, double 20.0, 1, 1), {{i32},{float, double}}* %p
39 ret float extractvalue ({{i32},{float, double}} zeroinitializer, 1, 0)
44 ; CHECK-NEXT: ret <{ i32, i32 }> <{ i32 0, i32 4 }>
45 define <{ i32, i32 }> @test57() {
46 ret <{ i32, i32 }> insertvalue (<{ i32, i32 }> zeroinitializer, i32 4, 1)