[llvm-commits] [llvm] r134330 - /llvm/trunk/test/CodeGen/X86/testl-commute.ll
Chandler Carruth
chandlerc at gmail.com
Sat Jul 2 13:42:11 PDT 2011
Author: chandlerc
Date: Sat Jul 2 15:42:11 2011
New Revision: 134330
URL: http://llvm.org/viewvc/llvm-project?rev=134330&view=rev
Log:
FileCheck-ize another test, making it much more precise for testing the
individual cases, while hard coding less about registers in use.
Modified:
llvm/trunk/test/CodeGen/X86/testl-commute.ll
Modified: llvm/trunk/test/CodeGen/X86/testl-commute.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/testl-commute.ll?rev=134330&r1=134329&r2=134330&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/testl-commute.ll (original)
+++ llvm/trunk/test/CodeGen/X86/testl-commute.ll Sat Jul 2 15:42:11 2011
@@ -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 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 @@
}
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 @@
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]
More information about the llvm-commits
mailing list