From 9695d08ab7b0f80f7a877e2d253b86f6526935b7 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 25 Jul 2014 23:59:20 +0000 Subject: [PATCH] [x86] FileCheck-ize this test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213988 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/pmul.ll | 69 +++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 18 deletions(-) diff --git a/test/CodeGen/X86/pmul.ll b/test/CodeGen/X86/pmul.ll index 7bf8a618fa7..2dfea6be403 100644 --- a/test/CodeGen/X86/pmul.ll +++ b/test/CodeGen/X86/pmul.ll @@ -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 }