Dan Gohman | 0a06310 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86 -mattr=+sse2 | grep -- -86 |
Evan Cheng | 8d68c2b | 2007-09-18 21:54:37 +0000 | [diff] [blame] | 2 | |
Evan Cheng | bf8b2c5 | 2008-04-05 00:30:36 +0000 | [diff] [blame] | 3 | define i16 @f(<4 x float>* %tmp116117.i1061.i) nounwind { |
Evan Cheng | 8d68c2b | 2007-09-18 21:54:37 +0000 | [diff] [blame] | 4 | entry: |
| 5 | alloca [4 x <4 x float>] ; <[4 x <4 x float>]*>:0 [#uses=167] |
| 6 | alloca [4 x <4 x float>] ; <[4 x <4 x float>]*>:1 [#uses=170] |
| 7 | alloca [4 x <4 x i32>] ; <[4 x <4 x i32>]*>:2 [#uses=12] |
Evan Cheng | 8d68c2b | 2007-09-18 21:54:37 +0000 | [diff] [blame] | 8 | %.sub6235.i = getelementptr [4 x <4 x float>]* %0, i32 0, i32 0 ; <<4 x float>*> [#uses=76] |
| 9 | %.sub.i = getelementptr [4 x <4 x float>]* %1, i32 0, i32 0 ; <<4 x float>*> [#uses=59] |
| 10 | |
Evan Cheng | 8d68c2b | 2007-09-18 21:54:37 +0000 | [diff] [blame] | 11 | %tmp124.i1062.i = getelementptr <4 x float>* %tmp116117.i1061.i, i32 63 ; <<4 x float>*> [#uses=1] |
| 12 | %tmp125.i1063.i = load <4 x float>* %tmp124.i1062.i ; <<4 x float>> [#uses=5] |
| 13 | %tmp828.i1077.i = shufflevector <4 x float> %tmp125.i1063.i, <4 x float> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 > ; <<4 x float>> [#uses=4] |
| 14 | %tmp704.i1085.i = load <4 x float>* %.sub6235.i ; <<4 x float>> [#uses=1] |
| 15 | %tmp712.i1086.i = call <4 x float> @llvm.x86.sse.max.ps( <4 x float> %tmp704.i1085.i, <4 x float> %tmp828.i1077.i ) ; <<4 x float>> [#uses=1] |
| 16 | store <4 x float> %tmp712.i1086.i, <4 x float>* %.sub.i |
| 17 | |
| 18 | %tmp2587.i1145.gep.i = getelementptr [4 x <4 x float>]* %1, i32 0, i32 0, i32 2 ; <float*> [#uses=1] |
| 19 | %tmp5334.i = load float* %tmp2587.i1145.gep.i ; <float> [#uses=5] |
| 20 | %tmp2723.i1170.i = insertelement <4 x float> undef, float %tmp5334.i, i32 2 ; <<4 x float>> [#uses=5] |
| 21 | store <4 x float> %tmp2723.i1170.i, <4 x float>* %.sub6235.i |
| 22 | |
| 23 | %tmp1406.i1367.i = shufflevector <4 x float> %tmp2723.i1170.i, <4 x float> undef, <4 x i32> < i32 2, i32 2, i32 2, i32 2 > ; <<4 x float>> [#uses=1] |
| 24 | %tmp84.i1413.i = load <4 x float>* %.sub6235.i ; <<4 x float>> [#uses=1] |
Dan Gohman | 7ce405e | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 25 | %tmp89.i1415.i = fmul <4 x float> %tmp84.i1413.i, %tmp1406.i1367.i ; <<4 x float>> [#uses=1] |
Evan Cheng | 8d68c2b | 2007-09-18 21:54:37 +0000 | [diff] [blame] | 26 | store <4 x float> %tmp89.i1415.i, <4 x float>* %.sub.i |
| 27 | ret i16 0 |
| 28 | } |
| 29 | |
| 30 | declare <4 x float> @llvm.x86.sse.max.ps(<4 x float>, <4 x float>) |