blob: d8ed4c097e00c7fb6b00784343168b8c4126a7a7 [file] [log] [blame]
Jakob Stoklund Olesen49b28032011-05-04 23:54:59 +00001; RUN: llc < %s -march=x86 -mattr=sse41 -stack-alignment=16 -join-physregs > %t
Mon P Wang75384542008-12-18 23:42:37 +00002; RUN: grep pmul %t | count 12
Eric Christopher8258d0b2010-03-30 18:49:01 +00003; RUN: grep mov %t | count 11
Dan Gohman0b924dc2008-05-23 17:49:40 +00004
Jakob Stoklund Olesen49b28032011-05-04 23:54:59 +00005; The f() arguments in %xmm0 and %xmm1 cause an extra movdqa without -join-physregs.
6
Dan Gohman0b924dc2008-05-23 17:49:40 +00007define <4 x i32> @a(<4 x i32> %i) nounwind {
8 %A = mul <4 x i32> %i, < i32 117, i32 117, i32 117, i32 117 >
9 ret <4 x i32> %A
10}
11define <2 x i64> @b(<2 x i64> %i) nounwind {
12 %A = mul <2 x i64> %i, < i64 117, i64 117 >
13 ret <2 x i64> %A
14}
15define <4 x i32> @c(<4 x i32> %i, <4 x i32> %j) nounwind {
16 %A = mul <4 x i32> %i, %j
17 ret <4 x i32> %A
18}
19define <2 x i64> @d(<2 x i64> %i, <2 x i64> %j) nounwind {
20 %A = mul <2 x i64> %i, %j
21 ret <2 x i64> %A
22}
23; Use a call to force spills.
24declare void @foo()
25define <4 x i32> @e(<4 x i32> %i, <4 x i32> %j) nounwind {
26 call void @foo()
27 %A = mul <4 x i32> %i, %j
28 ret <4 x i32> %A
29}
30define <2 x i64> @f(<2 x i64> %i, <2 x i64> %j) nounwind {
31 call void @foo()
32 %A = mul <2 x i64> %i, %j
33 ret <2 x i64> %A
34}