r217352 - clang/test/CodeGen/builtin-assume*.c: Fixup for -Asserts.
NAKAMURA Takumi
geek4civic at gmail.com
Sun Sep 7 18:12:55 PDT 2014
Author: chapuni
Date: Sun Sep 7 20:12:55 2014
New Revision: 217352
URL: http://llvm.org/viewvc/llvm-project?rev=217352&view=rev
Log:
clang/test/CodeGen/builtin-assume*.c: Fixup for -Asserts.
Modified:
cfe/trunk/test/CodeGen/builtin-assume-aligned.c
cfe/trunk/test/CodeGen/builtin-assume.c
Modified: cfe/trunk/test/CodeGen/builtin-assume-aligned.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtin-assume-aligned.c?rev=217352&r1=217351&r2=217352&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtin-assume-aligned.c (original)
+++ cfe/trunk/test/CodeGen/builtin-assume-aligned.c Sun Sep 7 20:12:55 2014
@@ -2,42 +2,42 @@
// CHECK-LABEL: @test1
int test1(int *a) {
-// CHECK: %ptrint = ptrtoint
-// CHECK: %maskedptr = and i64 %ptrint, 31
-// CHECK: %maskcond = icmp eq i64 %maskedptr, 0
-// CHECK: call void @llvm.assume(i1 %maskcond)
+// CHECK: [[PTRINT1:%.+]] = ptrtoint
+// CHECK: [[MASKEDPTR1:%.+]] = and i64 [[PTRINT1]], 31
+// CHECK: [[MASKCOND1:%.+]] = icmp eq i64 [[MASKEDPTR1]], 0
+// CHECK: call void @llvm.assume(i1 [[MASKCOND1]])
a = __builtin_assume_aligned(a, 32, 0ull);
return a[0];
}
// CHECK-LABEL: @test2
int test2(int *a) {
-// CHECK: %ptrint = ptrtoint
-// CHECK: %maskedptr = and i64 %ptrint, 31
-// CHECK: %maskcond = icmp eq i64 %maskedptr, 0
-// CHECK: call void @llvm.assume(i1 %maskcond)
+// CHECK: [[PTRINT2:%.+]] = ptrtoint
+// CHECK: [[MASKEDPTR2:%.+]] = and i64 [[PTRINT2]], 31
+// CHECK: [[MASKCOND2:%.+]] = icmp eq i64 [[MASKEDPTR2]], 0
+// CHECK: call void @llvm.assume(i1 [[MASKCOND2]])
a = __builtin_assume_aligned(a, 32, 0);
return a[0];
}
// CHECK-LABEL: @test3
int test3(int *a) {
-// CHECK: %ptrint = ptrtoint
-// CHECK: %maskedptr = and i64 %ptrint, 31
-// CHECK: %maskcond = icmp eq i64 %maskedptr, 0
-// CHECK: call void @llvm.assume(i1 %maskcond)
+// CHECK: [[PTRINT3:%.+]] = ptrtoint
+// CHECK: [[MASKEDPTR3:%.+]] = and i64 [[PTRINT3]], 31
+// CHECK: [[MASKCOND3:%.+]] = icmp eq i64 [[MASKEDPTR3]], 0
+// CHECK: call void @llvm.assume(i1 [[MASKCOND3]])
a = __builtin_assume_aligned(a, 32);
return a[0];
}
// CHECK-LABEL: @test4
int test4(int *a, int b) {
-// CHECK-DAG: %ptrint = ptrtoint
-// CHECK-DAG: %conv = sext i32
-// CHECK: %offsetptr = sub i64 %ptrint, %conv
-// CHECK: %maskedptr = and i64 %offsetptr, 31
-// CHECK: %maskcond = icmp eq i64 %maskedptr, 0
-// CHECK: call void @llvm.assume(i1 %maskcond)
+// CHECK-DAG: [[PTRINT4:%.+]] = ptrtoint
+// CHECK-DAG: [[CONV4:%.+]] = sext i32
+// CHECK: [[OFFSETPTR4:%.+]] = sub i64 [[PTRINT4]], [[CONV4]]
+// CHECK: [[MASKEDPTR4:%.+]] = and i64 [[OFFSETPTR4]], 31
+// CHECK: [[MASKCOND4:%.+]] = icmp eq i64 [[MASKEDPTR4]], 0
+// CHECK: call void @llvm.assume(i1 [[MASKCOND4]])
a = __builtin_assume_aligned(a, 32, b);
return a[0];
}
Modified: cfe/trunk/test/CodeGen/builtin-assume.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtin-assume.c?rev=217352&r1=217351&r2=217352&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtin-assume.c (original)
+++ cfe/trunk/test/CodeGen/builtin-assume.c Sun Sep 7 20:12:55 2014
@@ -3,9 +3,10 @@
// CHECK-LABEL: @test1
int test1(int *a, int i) {
-// CHECK: %0 = load i32** %a.addr
-// CHECK: %cmp = icmp ne i32* %0, null
-// CHECK: call void @llvm.assume(i1 %cmp)
+// CHECK: store i32* %a, i32** [[A_ADDR:%.+]], align
+// CHECK: [[A:%.+]] = load i32** [[A_ADDR]]
+// CHECK: [[CMP:%.+]] = icmp ne i32* [[A]], null
+// CHECK: call void @llvm.assume(i1 [[CMP]])
#ifdef _MSC_VER
__assume(a != 0)
#else
More information about the cfe-commits
mailing list