2014-07-25 23:59:20 +00:00
|
|
|
; RUN: llc < %s -march=x86 -mattr=sse4.1 -mcpu=nehalem -stack-alignment=16 | FileCheck %s
|
2008-05-23 17:49:40 +00:00
|
|
|
|
|
|
|
define <4 x i32> @a(<4 x i32> %i) nounwind {
|
2014-07-25 23:59:20 +00:00
|
|
|
; CHECK-LABEL: a:
|
|
|
|
; CHECK: pmulld
|
|
|
|
; CHECK-NEXT: retl
|
|
|
|
entry:
|
|
|
|
%A = mul <4 x i32> %i, < i32 117, i32 117, i32 117, i32 117 >
|
|
|
|
ret <4 x i32> %A
|
2008-05-23 17:49:40 +00:00
|
|
|
}
|
2014-07-25 23:59:20 +00:00
|
|
|
|
2008-05-23 17:49:40 +00:00
|
|
|
define <2 x i64> @b(<2 x i64> %i) nounwind {
|
2014-07-25 23:59:20 +00:00
|
|
|
; CHECK-LABEL: b:
|
|
|
|
; CHECK: pmuludq
|
|
|
|
; CHECK: pmuludq
|
|
|
|
; CHECK: pmuludq
|
|
|
|
entry:
|
|
|
|
%A = mul <2 x i64> %i, < i64 117, i64 117 >
|
|
|
|
ret <2 x i64> %A
|
2008-05-23 17:49:40 +00:00
|
|
|
}
|
2014-07-25 23:59:20 +00:00
|
|
|
|
2008-05-23 17:49:40 +00:00
|
|
|
define <4 x i32> @c(<4 x i32> %i, <4 x i32> %j) nounwind {
|
2014-07-25 23:59:20 +00:00
|
|
|
; CHECK-LABEL: c:
|
|
|
|
; CHECK: pmulld
|
|
|
|
; CHECK-NEXT: retl
|
|
|
|
entry:
|
|
|
|
%A = mul <4 x i32> %i, %j
|
|
|
|
ret <4 x i32> %A
|
2008-05-23 17:49:40 +00:00
|
|
|
}
|
2014-07-25 23:59:20 +00:00
|
|
|
|
2008-05-23 17:49:40 +00:00
|
|
|
define <2 x i64> @d(<2 x i64> %i, <2 x i64> %j) nounwind {
|
2014-07-25 23:59:20 +00:00
|
|
|
; CHECK-LABEL: d:
|
|
|
|
; CHECK: pmuludq
|
|
|
|
; CHECK: pmuludq
|
|
|
|
; CHECK: pmuludq
|
|
|
|
entry:
|
|
|
|
%A = mul <2 x i64> %i, %j
|
|
|
|
ret <2 x i64> %A
|
2008-05-23 17:49:40 +00:00
|
|
|
}
|
2014-07-25 23:59:20 +00:00
|
|
|
|
2008-05-23 17:49:40 +00:00
|
|
|
declare void @foo()
|
2014-07-25 23:59:20 +00:00
|
|
|
|
2008-05-23 17:49:40 +00:00
|
|
|
define <4 x i32> @e(<4 x i32> %i, <4 x i32> %j) nounwind {
|
2014-07-25 23:59:20 +00:00
|
|
|
; CHECK-LABEL: e:
|
|
|
|
; CHECK: pmulld {{[0-9]+}}(%esp), %xmm
|
|
|
|
; CHECK-NEXT: addl ${{[0-9]+}}, %esp
|
|
|
|
; CHECK-NEXT: retl
|
|
|
|
entry:
|
|
|
|
; Use a call to force spills.
|
|
|
|
call void @foo()
|
|
|
|
%A = mul <4 x i32> %i, %j
|
|
|
|
ret <4 x i32> %A
|
2008-05-23 17:49:40 +00:00
|
|
|
}
|
2014-07-25 23:59:20 +00:00
|
|
|
|
2008-05-23 17:49:40 +00:00
|
|
|
define <2 x i64> @f(<2 x i64> %i, <2 x i64> %j) nounwind {
|
2014-07-25 23:59:20 +00:00
|
|
|
; CHECK-LABEL: f:
|
|
|
|
; CHECK: pmuludq
|
|
|
|
; CHECK: pmuludq
|
|
|
|
; CHECK: pmuludq
|
|
|
|
entry:
|
|
|
|
; Use a call to force spills.
|
|
|
|
call void @foo()
|
|
|
|
%A = mul <2 x i64> %i, %j
|
|
|
|
ret <2 x i64> %A
|
2008-05-23 17:49:40 +00:00
|
|
|
}
|