blob: ceabcb71a78b37463483d4a6e004bc63b27e83a6 [file] [log] [blame]
Chris Lattner6f948be2010-12-19 20:12:58 +00001; RUN: llc < %s -march=x86-64 -mattr=+sse42 | FileCheck %s
Mon P Wangcab98e32010-11-19 19:08:12 +00002
3
4define float @extractFloat1() nounwind {
5entry:
6 ; CHECK: 1065353216
7 %tmp0 = bitcast <1 x double> <double 0x000000003F800000> to <2 x float>
8 %tmp1 = extractelement <2 x float> %tmp0, i32 0
9 ret float %tmp1
10}
11
12define float @extractFloat2() nounwind {
13entry:
Jakob Stoklund Olesen0edd83b2011-11-29 22:27:25 +000014 ; CHECK: xorps %xmm0, %xmm0
Mon P Wangcab98e32010-11-19 19:08:12 +000015 %tmp4 = bitcast <1 x double> <double 0x000000003F800000> to <2 x float>
16 %tmp5 = extractelement <2 x float> %tmp4, i32 1
17 ret float %tmp5
18}
19
20define i32 @extractInt2() nounwind {
21entry:
22 ; CHECK: xorl %eax, %eax
23 %tmp4 = bitcast <1 x i64> <i64 256> to <2 x i32>
24 %tmp5 = extractelement <2 x i32> %tmp4, i32 1
25 ret i32 %tmp5
26}
27