blob: 112d1ab65e7b84452830c54f70f0a26c3805a2d4 [file] [log] [blame]
Dan Gohman36a09472009-09-08 23:54:48 +00001; RUN: llc < %s -mtriple=x86_64-apple-darwin8 -mattr=+sse2
2; RUN: llc < %s -mtriple=x86_64-apple-darwin8 -mattr=+sse2 | not grep movhlps
Evan Chengc6214692007-03-02 10:37:19 +00003
Evan Cheng17114242009-05-12 18:35:43 +00004define void @test() nounwind {
Evan Chengc6214692007-03-02 10:37:19 +00005test.exit:
Dan Gohmanae3a0be2009-06-04 22:49:04 +00006 fmul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:0 [#uses=4]
Evan Chengc6214692007-03-02 10:37:19 +00007 load <4 x float>* null ; <<4 x float>>:1 [#uses=1]
8 shufflevector <4 x float> %1, <4 x float> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x float>>:2 [#uses=1]
Dan Gohmanae3a0be2009-06-04 22:49:04 +00009 fmul <4 x float> %0, %2 ; <<4 x float>>:3 [#uses=1]
10 fsub <4 x float> zeroinitializer, %3 ; <<4 x float>>:4 [#uses=1]
11 fmul <4 x float> %4, zeroinitializer ; <<4 x float>>:5 [#uses=2]
Reid Spencer2318ec62007-03-19 18:27:35 +000012 bitcast <4 x float> zeroinitializer to <4 x i32> ; <<4 x i32>>:6 [#uses=1]
13 and <4 x i32> %6, < i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647 > ; <<4 x i32>>:7 [#uses=1]
14 bitcast <4 x i32> %7 to <4 x float> ; <<4 x float>>:8 [#uses=2]
15 extractelement <4 x float> %8, i32 0 ; <float>:9 [#uses=1]
16 extractelement <4 x float> %8, i32 1 ; <float>:10 [#uses=2]
17 br i1 false, label %11, label %19
Evan Chengc6214692007-03-02 10:37:19 +000018
Reid Spencer2318ec62007-03-19 18:27:35 +000019; <label>:11 ; preds = %test.exit
20 br i1 false, label %17, label %12
Evan Chengc6214692007-03-02 10:37:19 +000021
Reid Spencer2318ec62007-03-19 18:27:35 +000022; <label>:12 ; preds = %11
23 br i1 false, label %19, label %13
Evan Chengc6214692007-03-02 10:37:19 +000024
Reid Spencer2318ec62007-03-19 18:27:35 +000025; <label>:13 ; preds = %12
Dan Gohmanae3a0be2009-06-04 22:49:04 +000026 fsub float -0.000000e+00, 0.000000e+00 ; <float>:14 [#uses=1]
Evan Chengc6214692007-03-02 10:37:19 +000027 %tmp207 = extractelement <4 x float> zeroinitializer, i32 0 ; <float> [#uses=1]
28 %tmp208 = extractelement <4 x float> zeroinitializer, i32 2 ; <float> [#uses=1]
Dan Gohmanae3a0be2009-06-04 22:49:04 +000029 fsub float -0.000000e+00, %tmp208 ; <float>:15 [#uses=1]
Evan Chengc6214692007-03-02 10:37:19 +000030 %tmp155 = extractelement <4 x float> zeroinitializer, i32 0 ; <float> [#uses=1]
31 %tmp156 = extractelement <4 x float> zeroinitializer, i32 2 ; <float> [#uses=1]
Dan Gohmanae3a0be2009-06-04 22:49:04 +000032 fsub float -0.000000e+00, %tmp156 ; <float>:16 [#uses=1]
Reid Spencer2318ec62007-03-19 18:27:35 +000033 br label %19
Evan Chengc6214692007-03-02 10:37:19 +000034
Reid Spencer2318ec62007-03-19 18:27:35 +000035; <label>:17 ; preds = %11
36 br i1 false, label %19, label %18
Evan Chengc6214692007-03-02 10:37:19 +000037
Reid Spencer2318ec62007-03-19 18:27:35 +000038; <label>:18 ; preds = %17
39 br label %19
Evan Chengc6214692007-03-02 10:37:19 +000040
Reid Spencer2318ec62007-03-19 18:27:35 +000041; <label>:19 ; preds = %18, %17, %13, %12, %test.exit
42 phi i32 [ 5, %18 ], [ 3, %13 ], [ 1, %test.exit ], [ 2, %12 ], [ 4, %17 ] ; <i32>:20 [#uses=0]
43 phi float [ 0.000000e+00, %18 ], [ %16, %13 ], [ 0.000000e+00, %test.exit ], [ 0.000000e+00, %12 ], [ 0.000000e+00, %17 ] ; <float>:21 [#uses=1]
44 phi float [ 0.000000e+00, %18 ], [ %tmp155, %13 ], [ 0.000000e+00, %test.exit ], [ 0.000000e+00, %12 ], [ 0.000000e+00, %17 ] ; <float>:22 [#uses=1]
45 phi float [ 0.000000e+00, %18 ], [ %15, %13 ], [ 0.000000e+00, %test.exit ], [ 0.000000e+00, %12 ], [ 0.000000e+00, %17 ] ; <float>:23 [#uses=1]
46 phi float [ 0.000000e+00, %18 ], [ %tmp207, %13 ], [ 0.000000e+00, %test.exit ], [ 0.000000e+00, %12 ], [ 0.000000e+00, %17 ] ; <float>:24 [#uses=1]
47 phi float [ 0.000000e+00, %18 ], [ %10, %13 ], [ %9, %test.exit ], [ %10, %12 ], [ 0.000000e+00, %17 ] ; <float>:25 [#uses=2]
48 phi float [ 0.000000e+00, %18 ], [ %14, %13 ], [ 0.000000e+00, %test.exit ], [ 0.000000e+00, %12 ], [ 0.000000e+00, %17 ] ; <float>:26 [#uses=1]
49 phi float [ 0.000000e+00, %18 ], [ 0.000000e+00, %13 ], [ 0.000000e+00, %test.exit ], [ 0.000000e+00, %12 ], [ 0.000000e+00, %17 ] ; <float>:27 [#uses=1]
50 insertelement <4 x float> undef, float %27, i32 0 ; <<4 x float>>:28 [#uses=1]
51 insertelement <4 x float> %28, float %26, i32 1 ; <<4 x float>>:29 [#uses=0]
52 insertelement <4 x float> undef, float %24, i32 0 ; <<4 x float>>:30 [#uses=1]
53 insertelement <4 x float> %30, float %23, i32 1 ; <<4 x float>>:31 [#uses=1]
54 insertelement <4 x float> %31, float %25, i32 2 ; <<4 x float>>:32 [#uses=1]
55 insertelement <4 x float> %32, float %25, i32 3 ; <<4 x float>>:33 [#uses=1]
56 fdiv <4 x float> %33, zeroinitializer ; <<4 x float>>:34 [#uses=1]
Dan Gohmanae3a0be2009-06-04 22:49:04 +000057 fmul <4 x float> %34, < float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01 > ; <<4 x float>>:35 [#uses=1]
Reid Spencer2318ec62007-03-19 18:27:35 +000058 insertelement <4 x float> undef, float %22, i32 0 ; <<4 x float>>:36 [#uses=1]
59 insertelement <4 x float> %36, float %21, i32 1 ; <<4 x float>>:37 [#uses=0]
60 br i1 false, label %foo.exit, label %38
Evan Chengc6214692007-03-02 10:37:19 +000061
Reid Spencer2318ec62007-03-19 18:27:35 +000062; <label>:38 ; preds = %19
63 extractelement <4 x float> %0, i32 0 ; <float>:39 [#uses=1]
64 fcmp ogt float %39, 0.000000e+00 ; <i1>:40 [#uses=1]
65 extractelement <4 x float> %0, i32 2 ; <float>:41 [#uses=1]
66 extractelement <4 x float> %0, i32 1 ; <float>:42 [#uses=1]
Dan Gohmanae3a0be2009-06-04 22:49:04 +000067 fsub float -0.000000e+00, %42 ; <float>:43 [#uses=2]
Evan Chengc6214692007-03-02 10:37:19 +000068 %tmp189 = extractelement <4 x float> %5, i32 2 ; <float> [#uses=1]
Reid Spencer2318ec62007-03-19 18:27:35 +000069 br i1 %40, label %44, label %46
Evan Chengc6214692007-03-02 10:37:19 +000070
Reid Spencer2318ec62007-03-19 18:27:35 +000071; <label>:44 ; preds = %38
Dan Gohmanae3a0be2009-06-04 22:49:04 +000072 fsub float -0.000000e+00, %tmp189 ; <float>:45 [#uses=0]
Evan Chengc6214692007-03-02 10:37:19 +000073 br label %foo.exit
74
Reid Spencer2318ec62007-03-19 18:27:35 +000075; <label>:46 ; preds = %38
Evan Chengc6214692007-03-02 10:37:19 +000076 %tmp192 = extractelement <4 x float> %5, i32 1 ; <float> [#uses=1]
Dan Gohmanae3a0be2009-06-04 22:49:04 +000077 fsub float -0.000000e+00, %tmp192 ; <float>:47 [#uses=1]
Evan Chengc6214692007-03-02 10:37:19 +000078 br label %foo.exit
79
Reid Spencer2318ec62007-03-19 18:27:35 +000080foo.exit: ; preds = %46, %44, %19
81 phi float [ 0.000000e+00, %44 ], [ %47, %46 ], [ 0.000000e+00, %19 ] ; <float>:48 [#uses=0]
82 phi float [ %43, %44 ], [ %43, %46 ], [ 0.000000e+00, %19 ] ; <float>:49 [#uses=0]
83 phi float [ 0.000000e+00, %44 ], [ %41, %46 ], [ 0.000000e+00, %19 ] ; <float>:50 [#uses=0]
84 shufflevector <4 x float> %35, <4 x float> zeroinitializer, <4 x i32> < i32 0, i32 4, i32 1, i32 5 > ; <<4 x float>>:51 [#uses=0]
Evan Chengc6214692007-03-02 10:37:19 +000085 unreachable
86}