summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-07-02 20:42:11 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-07-02 20:42:11 +0000
commit4d28d7365abcd7fdd67d3ef5ea2a45400ef4f041 (patch)
treed2b15457d2994ca2474f75cda2818eaa9530f160
parent549f12371565c591ef461f06dcbca363d018ffce (diff)
downloadllvm-4d28d7365abcd7fdd67d3ef5ea2a45400ef4f041.tar.gz
llvm-4d28d7365abcd7fdd67d3ef5ea2a45400ef4f041.tar.bz2
llvm-4d28d7365abcd7fdd67d3ef5ea2a45400ef4f041.tar.xz
FileCheck-ize another test, making it much more precise for testing the
individual cases, while hard coding less about registers in use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134330 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/X86/testl-commute.ll18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/CodeGen/X86/testl-commute.ll b/test/CodeGen/X86/testl-commute.ll
index 3d5f672f98..0e6f6363cb 100644
--- a/test/CodeGen/X86/testl-commute.ll
+++ b/test/CodeGen/X86/testl-commute.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s | grep {testl.*\(%r.i\), %} | count 3
+; RUN: llc < %s | FileCheck %s
; rdar://5671654
; The loads should fold into the testl instructions, no matter how
; the inputs are commuted.
@@ -7,6 +7,11 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
target triple = "x86_64-apple-darwin7"
define i32 @test(i32* %P, i32* %G) nounwind {
+; CHECK: test:
+; CHECK-NOT: ret
+; CHECK: testl (%{{.*}}), %{{.*}}
+; CHECK: ret
+
entry:
%0 = load i32* %P, align 4 ; <i32> [#uses=3]
%1 = load i32* %G, align 4 ; <i32> [#uses=1]
@@ -23,6 +28,11 @@ bb1: ; preds = %entry
}
define i32 @test2(i32* %P, i32* %G) nounwind {
+; CHECK: test2:
+; CHECK-NOT: ret
+; CHECK: testl (%{{.*}}), %{{.*}}
+; CHECK: ret
+
entry:
%0 = load i32* %P, align 4 ; <i32> [#uses=3]
%1 = load i32* %G, align 4 ; <i32> [#uses=1]
@@ -37,7 +47,13 @@ bb: ; preds = %entry
bb1: ; preds = %entry
ret i32 %0
}
+
define i32 @test3(i32* %P, i32* %G) nounwind {
+; CHECK: test3:
+; CHECK-NOT: ret
+; CHECK: testl (%{{.*}}), %{{.*}}
+; CHECK: ret
+
entry:
%0 = load i32* %P, align 4 ; <i32> [#uses=3]
%1 = load i32* %G, align 4 ; <i32> [#uses=1]