@@ -79,13 +79,24 @@ define float @test_extract_1(<2 x float> %a) #0 {
79
79
ret float %e
80
80
}
81
81
82
- ; NOTE: disabled as -O3 miscompiles this into pointer arithmetic on
83
- ; test_extract_i_param_0 where the symbol's address is not taken first (that
84
- ; is, moved to a temporary)
85
- ; define float @test_extract_i(<2 x float> %a, i64 %idx) #0 {
86
- ; %e = extractelement <2 x float> %a, i64 %idx
87
- ; ret float %e
88
- ; }
82
+ define float @test_extract_i (<2 x float > %a , i64 %idx ) #0 {
83
+ ; CHECK-LABEL: test_extract_i(
84
+ ; CHECK: {
85
+ ; CHECK-NEXT: .reg .pred %p<2>;
86
+ ; CHECK-NEXT: .reg .b32 %r<4>;
87
+ ; CHECK-NEXT: .reg .b64 %rd<3>;
88
+ ; CHECK-EMPTY:
89
+ ; CHECK-NEXT: // %bb.0:
90
+ ; CHECK-NEXT: ld.param.b64 %rd2, [test_extract_i_param_1];
91
+ ; CHECK-NEXT: ld.param.b64 %rd1, [test_extract_i_param_0];
92
+ ; CHECK-NEXT: setp.eq.b64 %p1, %rd2, 0;
93
+ ; CHECK-NEXT: mov.b64 {%r1, %r2}, %rd1;
94
+ ; CHECK-NEXT: selp.f32 %r3, %r1, %r2, %p1;
95
+ ; CHECK-NEXT: st.param.b32 [func_retval0], %r3;
96
+ ; CHECK-NEXT: ret;
97
+ %e = extractelement <2 x float > %a , i64 %idx
98
+ ret float %e
99
+ }
89
100
90
101
define <2 x float > @test_fadd (<2 x float > %a , <2 x float > %b ) #0 {
91
102
; CHECK-NOF32X2-LABEL: test_fadd(
0 commit comments