[llvm] r213988 - [x86] FileCheck-ize this test.
Chandler Carruth
chandlerc at gmail.com
Fri Jul 25 16:59:20 PDT 2014
Author: chandlerc
Date: Fri Jul 25 18:59:20 2014
New Revision: 213988
URL: http://llvm.org/viewvc/llvm-project?rev=213988&view=rev
Log:
[x86] FileCheck-ize this test.
Modified:
llvm/trunk/test/CodeGen/X86/pmul.ll
Modified: llvm/trunk/test/CodeGen/X86/pmul.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pmul.ll?rev=213988&r1=213987&r2=213988&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pmul.ll (original)
+++ llvm/trunk/test/CodeGen/X86/pmul.ll Fri Jul 25 18:59:20 2014
@@ -1,32 +1,65 @@
-; RUN: llc < %s -march=x86 -mattr=sse4.1 -mcpu=nehalem -stack-alignment=16 > %t
-; RUN: grep pmul %t | count 12
-; RUN: grep mov %t | count 14
+; RUN: llc < %s -march=x86 -mattr=sse4.1 -mcpu=nehalem -stack-alignment=16 | FileCheck %s
define <4 x i32> @a(<4 x i32> %i) nounwind {
- %A = mul <4 x i32> %i, < i32 117, i32 117, i32 117, i32 117 >
- ret <4 x i32> %A
+; 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
}
+
define <2 x i64> @b(<2 x i64> %i) nounwind {
- %A = mul <2 x i64> %i, < i64 117, i64 117 >
- ret <2 x i64> %A
+; 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
}
+
define <4 x i32> @c(<4 x i32> %i, <4 x i32> %j) nounwind {
- %A = mul <4 x i32> %i, %j
- ret <4 x i32> %A
+; CHECK-LABEL: c:
+; CHECK: pmulld
+; CHECK-NEXT: retl
+entry:
+ %A = mul <4 x i32> %i, %j
+ ret <4 x i32> %A
}
+
define <2 x i64> @d(<2 x i64> %i, <2 x i64> %j) nounwind {
- %A = mul <2 x i64> %i, %j
- ret <2 x i64> %A
+; CHECK-LABEL: d:
+; CHECK: pmuludq
+; CHECK: pmuludq
+; CHECK: pmuludq
+entry:
+ %A = mul <2 x i64> %i, %j
+ ret <2 x i64> %A
}
-; Use a call to force spills.
+
declare void @foo()
+
define <4 x i32> @e(<4 x i32> %i, <4 x i32> %j) nounwind {
- call void @foo()
- %A = mul <4 x i32> %i, %j
- ret <4 x i32> %A
+; 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
}
+
define <2 x i64> @f(<2 x i64> %i, <2 x i64> %j) nounwind {
- call void @foo()
- %A = mul <2 x i64> %i, %j
- ret <2 x i64> %A
+; 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
}
More information about the llvm-commits
mailing list