Mon P Wang | a0fd0d5 | 2010-12-19 23:55:53 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86 -mattr=sse41 | FileCheck %s |
Mon P Wang | c7849c2 | 2008-11-16 05:06:27 +0000 | [diff] [blame] | 2 | |
| 3 | ; ModuleID = 'vec_shuffle-27.bc' |
| 4 | target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" |
| 5 | target triple = "i686-apple-cl.1.0" |
| 6 | |
| 7 | define <8 x float> @my2filter4_1d(<4 x float> %a, <8 x float> %T0, <8 x float> %T1) nounwind readnone { |
| 8 | entry: |
Mon P Wang | a0fd0d5 | 2010-12-19 23:55:53 +0000 | [diff] [blame] | 9 | ; CHECK: subps |
| 10 | ; CHECK: mulps |
| 11 | ; CHECK: addps |
| 12 | ; CHECK: subps |
| 13 | ; CHECK: mulps |
| 14 | ; CHECK: addps |
Mon P Wang | c7849c2 | 2008-11-16 05:06:27 +0000 | [diff] [blame] | 15 | %tmp7 = shufflevector <4 x float> %a, <4 x float> undef, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3 > ; <<8 x float>> [#uses=1] |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 16 | %sub = fsub <8 x float> %T1, %T0 ; <<8 x float>> [#uses=1] |
| 17 | %mul = fmul <8 x float> %sub, %tmp7 ; <<8 x float>> [#uses=1] |
| 18 | %add = fadd <8 x float> %mul, %T0 ; <<8 x float>> [#uses=1] |
Mon P Wang | c7849c2 | 2008-11-16 05:06:27 +0000 | [diff] [blame] | 19 | ret <8 x float> %add |
| 20 | } |
Mon P Wang | a0fd0d5 | 2010-12-19 23:55:53 +0000 | [diff] [blame] | 21 | |
Mon P Wang | e273690 | 2010-12-20 00:54:26 +0000 | [diff] [blame] | 22 | ; Test case for r122206 |
Mon P Wang | a0fd0d5 | 2010-12-19 23:55:53 +0000 | [diff] [blame] | 23 | define void @test2(<4 x i64>* %ap, <4 x i64>* %bp) nounwind { |
| 24 | entry: |
Mon P Wang | e273690 | 2010-12-20 00:54:26 +0000 | [diff] [blame] | 25 | ; CHECK: movdqa |
Mon P Wang | a0fd0d5 | 2010-12-19 23:55:53 +0000 | [diff] [blame] | 26 | %a = load <4 x i64> * %ap |
| 27 | %b = load <4 x i64> * %bp |
| 28 | %mulaa = mul <4 x i64> %a, %a |
| 29 | %mulbb = mul <4 x i64> %b, %b |
| 30 | %mulab = mul <4 x i64> %a, %b |
| 31 | %vect1271 = shufflevector <4 x i64> %mulaa, <4 x i64> %mulbb, <4 x i32> <i32 0, i32 4, i32 undef, i32 undef> |
| 32 | %vect1272 = shufflevector <4 x i64> %mulaa, <4 x i64> %mulbb, <4 x i32> <i32 1, i32 5, i32 undef, i32 undef> |
| 33 | %vect1487 = shufflevector <4 x i64> %vect1271, <4 x i64> %mulab, <4 x i32> <i32 0, i32 1, i32 2, i32 4> |
| 34 | %vect1488 = shufflevector <4 x i64> %vect1272, <4 x i64> %mulab, <4 x i32> <i32 0, i32 1, i32 2, i32 5> |
| 35 | store <4 x i64> %vect1487, <4 x i64>* %ap |
| 36 | store <4 x i64> %vect1488, <4 x i64>* %bp |
| 37 | ret void; |
| 38 | } |