[cfe-commits] r86800 - in /cfe/trunk/test: CodeGen/2008-07-29-override-alias-decl.c CodeGen/address-space-field1.c CodeGen/attributes.c CodeGenCXX/member-function-pointers.cpp
Daniel Dunbar
daniel at zuster.org
Tue Nov 10 19:48:26 PST 2009
Author: ddunbar
Date: Tue Nov 10 21:48:26 2009
New Revision: 86800
URL: http://llvm.org/viewvc/llvm-project?rev=86800&view=rev
Log:
Fix some tests in -Asserts mode.
- FileCheck is a *huuuuge* improvement here.
- Still feels like we could use a better tool for this though, either teach
llvm-dis to spit out the FileCheck syntax, or provide another tool to turn a
.ll into a "matchable" input.
- Also on my Christmas list is better FileCheck diagnostics with missing
variables or mismatches.
Modified:
cfe/trunk/test/CodeGen/2008-07-29-override-alias-decl.c
cfe/trunk/test/CodeGen/address-space-field1.c
cfe/trunk/test/CodeGen/attributes.c
cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp
Modified: cfe/trunk/test/CodeGen/2008-07-29-override-alias-decl.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2008-07-29-override-alias-decl.c?rev=86800&r1=86799&r2=86800&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/2008-07-29-override-alias-decl.c (original)
+++ cfe/trunk/test/CodeGen/2008-07-29-override-alias-decl.c Tue Nov 10 21:48:26 2009
@@ -2,10 +2,10 @@
int x() { return 1; }
-// CHECK: %retval = alloca i32
-// CHECK: store i32 1, i32* %retval
-// CHECK: %0 = load i32* %retval
-// CHECK: ret i32 %0
+// CHECK: [[retval:%.*]] = alloca i32
+// CHECK: store i32 1, i32* [[retval]]
+// CHECK: [[load:%.*]] = load i32* [[retval]]
+// CHECK: ret i32 [[load]]
int f() __attribute__((weak, alias("x")));
@@ -17,9 +17,9 @@
return f();
}
-// CHECK: %retval = alloca i32
-// CHECK: %call = call i32 (...)* @f()
-// CHECK: store i32 %call, i32* %retval
-// CHECK: %0 = load i32* %retval
-// CHECK: ret i32 %0
+// CHECK: [[retval:%.*]] = alloca i32
+// CHECK: [[call:%.*]] = call i32 (...)* @f()
+// CHECK: store i32 [[call]], i32* [[retval]]
+// CHECK: [[load:%.*]] = load i32* [[retval]]
+// CHECK: ret i32 [[load]]
Modified: cfe/trunk/test/CodeGen/address-space-field1.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/address-space-field1.c?rev=86800&r1=86799&r2=86800&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/address-space-field1.c (original)
+++ cfe/trunk/test/CodeGen/address-space-field1.c Tue Nov 10 21:48:26 2009
@@ -1,23 +1,22 @@
// RUN: clang-cc -emit-llvm < %s -o - | FileCheck %s
// CHECK:%struct.S = type { i32, i32 }
// CHECK:define void @test_addrspace(%struct.S addrspace(1)* %p1, %struct.S addrspace(2)* %p2) nounwind
-// CHECK:entry:
-// CHECK: %p1.addr = alloca %struct.S addrspace(1)* ; <%struct.S addrspace(1)**> [#uses=3]
-// CHECK: %p2.addr = alloca %struct.S addrspace(2)* ; <%struct.S addrspace(2)**> [#uses=3]
-// CHECK: store %struct.S addrspace(1)* %p1, %struct.S addrspace(1)** %p1.addr
-// CHECK: store %struct.S addrspace(2)* %p2, %struct.S addrspace(2)** %p2.addr
-// CHECK: %tmp = load %struct.S addrspace(2)** %p2.addr ; <%struct.S addrspace(2)*> [#uses=1]
-// CHECK: %tmp1 = getelementptr inbounds %struct.S addrspace(2)* %tmp, i32 0, i32 1 ; <i32 addrspace(2)*> [#uses=1]
-// CHECK: %tmp2 = load i32 addrspace(2)* %tmp1 ; <i32> [#uses=1]
-// CHECK: %tmp3 = load %struct.S addrspace(1)** %p1.addr ; <%struct.S addrspace(1)*> [#uses=1]
-// CHECK: %tmp4 = getelementptr inbounds %struct.S addrspace(1)* %tmp3, i32 0, i32 0 ; <i32 addrspace(1)*> [#uses=1]
-// CHECK: store i32 %tmp2, i32 addrspace(1)* %tmp4
-// CHECK: %tmp5 = load %struct.S addrspace(2)** %p2.addr ; <%struct.S addrspace(2)*> [#uses=1]
-// CHECK: %tmp6 = getelementptr inbounds %struct.S addrspace(2)* %tmp5, i32 0, i32 0 ; <i32 addrspace(2)*> [#uses=1]
-// CHECK: %tmp7 = load i32 addrspace(2)* %tmp6 ; <i32> [#uses=1]
-// CHECK: %tmp8 = load %struct.S addrspace(1)** %p1.addr ; <%struct.S addrspace(1)*> [#uses=1]
-// CHECK: %tmp9 = getelementptr inbounds %struct.S addrspace(1)* %tmp8, i32 0, i32 1 ; <i32 addrspace(1)*> [#uses=1]
-// CHECK: store i32 %tmp7, i32 addrspace(1)* %tmp9
+// CHECK: [[p1addr:%.*]] = alloca %struct.S addrspace(1)* ; <%struct.S addrspace(1)**> [#uses=3]
+// CHECK: [[p2addr:%.*]] = alloca %struct.S addrspace(2)* ; <%struct.S addrspace(2)**> [#uses=3]
+// CHECK: store %struct.S addrspace(1)* %p1, %struct.S addrspace(1)** [[p1addr]]
+// CHECK: store %struct.S addrspace(2)* %p2, %struct.S addrspace(2)** [[p2addr]]
+// CHECK: [[t0:%.*]] = load %struct.S addrspace(2)** [[p2addr]] ; <%struct.S addrspace(2)*> [#uses=1]
+// CHECK: [[t1:%.*]] = getelementptr inbounds %struct.S addrspace(2)* [[t0]], i32 0, i32 1 ; <i32 addrspace(2)*> [#uses=1]
+// CHECK: [[t2:%.*]] = load i32 addrspace(2)* [[t1]] ; <i32> [#uses=1]
+// CHECK: [[t3:%.*]] = load %struct.S addrspace(1)** [[p1addr]] ; <%struct.S addrspace(1)*> [#uses=1]
+// CHECK: [[t4:%.*]] = getelementptr inbounds %struct.S addrspace(1)* [[t3]], i32 0, i32 0 ; <i32 addrspace(1)*> [#uses=1]
+// CHECK: store i32 [[t2]], i32 addrspace(1)* [[t4]]
+// CHECK: [[t5:%.*]] = load %struct.S addrspace(2)** [[p2addr]] ; <%struct.S addrspace(2)*> [#uses=1]
+// CHECK: [[t6:%.*]] = getelementptr inbounds %struct.S addrspace(2)* [[t5]], i32 0, i32 0 ; <i32 addrspace(2)*> [#uses=1]
+// CHECK: [[t7:%.*]] = load i32 addrspace(2)* [[t6]] ; <i32> [#uses=1]
+// CHECK: [[t8:%.*]] = load %struct.S addrspace(1)** [[p1addr]] ; <%struct.S addrspace(1)*> [#uses=1]
+// CHECK: [[t9:%.*]] = getelementptr inbounds %struct.S addrspace(1)* [[t8]], i32 0, i32 1 ; <i32 addrspace(1)*> [#uses=1]
+// CHECK: store i32 [[t7]], i32 addrspace(1)* [[t9]]
// CHECK: ret void
// CHECK:}
Modified: cfe/trunk/test/CodeGen/attributes.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attributes.c?rev=86800&r1=86799&r2=86800&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/attributes.c (original)
+++ cfe/trunk/test/CodeGen/attributes.c Tue Nov 10 21:48:26 2009
@@ -69,7 +69,6 @@
}
// CHECK:define void @t20() nounwind {
-// CHECK-NEXT:entry:
// CHECK-NEXT: call void @abort()
// CHECK-NEXT: unreachable
void t20(void) {
Modified: cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp?rev=86800&r1=86799&r2=86800&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp Tue Nov 10 21:48:26 2009
@@ -30,8 +30,8 @@
// CHECK: volatile store i64 0, i64* getelementptr inbounds (%0* @vpa, i32 0, i32 1)
vpa = 0;
- // CHECK: store i64 %0, i64* getelementptr inbounds (%0* @pc, i32 0, i32 0)
- // CHECK: [[ADJ:%[a-zA-Z0-9\.]+]] = add i64 %1, 16
+ // CHECK: store i64 {{.*}}, i64* getelementptr inbounds (%0* @pc, i32 0, i32 0)
+ // CHECK: [[ADJ:%[a-zA-Z0-9\.]+]] = add i64 {{.*}}, 16
// CHECK: store i64 [[ADJ]], i64* getelementptr inbounds (%0* @pc, i32 0, i32 1)
pc = pa;
}
@@ -46,7 +46,7 @@
// CHECK: [[pa3ptr:%[a-zA-Z0-9\.]+]] = getelementptr inbounds %0* %pa3, i32 0, i32 0
// CHECK: store i64 1, i64* [[pa3ptr]]
// CHECK: [[pa3adj:%[a-zA-Z0-9\.]+]] = getelementptr inbounds %0* %pa3, i32 0, i32 1
- // CHECK: store i64 0, i64* [[pa2adj]]
+ // CHECK: store i64 0, i64* [[pa3adj]]
void (A::*pa3)() = &A::vf;
}
More information about the cfe-commits
mailing list