[PATCH,RFC] allow signext attribute (for Power).
Will Schmidt
will_schmidt at vnet.ibm.com
Thu May 29 14:20:06 PDT 2014
Allow the cxx-irgen and parallel_codegen tests to succeed when the
signext attribute is present. (As seen on PowerPC).
This should fix the current failures seen in Modules/cxx-irgen.cpp and
OpenMP/parallel_codegen.cpp
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/15027/steps/check-all/logs/Clang%3A%3Acxx-irgen.cpp
and
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/15027/steps/check-all/logs/Clang%3A%3Aparallel_codegen.cpp
Thanks,
-Will
diff --git a/tools/clang/test/Modules/cxx-irgen.cpp b/tools/clang/test/Modules/cxx-irgen.cpp
index 7c680f8..3b450bc 100644
--- a/tools/clang/test/Modules/cxx-irgen.cpp
+++ b/tools/clang/test/Modules/cxx-irgen.cpp
@@ -4,19 +4,19 @@
@import cxx_irgen_top;
-// CHECK-DAG: call i32 @_ZN8CtorInitIiE1fEv(
+// CHECK-DAG: call {{.*}}i32 @_ZN8CtorInitIiE1fEv(
CtorInit<int> x;
@import cxx_irgen_left;
@import cxx_irgen_right;
-// CHECK-DAG: define available_externally hidden {{signext i32|i32}} @_ZN1SIiE1gEv({{.*}} #[[ALWAYS_INLINE:.*]] align
+// CHECK-DAG: define available_externally hidden {{.*}}i32 @_ZN1SIiE1gEv({{.*}} #[[ALWAYS_INLINE:.*]] align
int a = S<int>::g();
-// CHECK-DAG: define available_externally {{signext i32|i32}} @_ZN1SIiE1fEv({{.*}} #[[ALWAYS_INLINE]] align
+// CHECK-DAG: define available_externally {{.*}}i32 @_ZN1SIiE1fEv({{.*}} #[[ALWAYS_INLINE]] align
int b = h();
-// CHECK-DAG: define linkonce_odr {{signext i32|i32}} @_Z3minIiET_S0_S0_(i32
+// CHECK-DAG: define linkonce_odr {{.*}}i32 @_Z3minIiET_S0_S0_(i32
int c = min(1, 2);
// CHECK: attributes #[[ALWAYS_INLINE]] = {{.*}} alwaysinline
diff --git a/tools/clang/test/OpenMP/parallel_codegen.cpp b/tools/clang/test/OpenMP/parallel_codegen.cpp
index 28505ab..194a4a4 100644
--- a/tools/clang/test/OpenMP/parallel_codegen.cpp
+++ b/tools/clang/test/OpenMP/parallel_codegen.cpp
@@ -34,14 +34,14 @@ int main (int argc, char **argv) {
return tmain(argv);
}
-// CHECK-LABEL: define i32 @main(i32 %argc, i8** %argv)
+// CHECK-LABEL: define {{.*}}i32 @main(i32 {{.*}}%argc, i8** %argv)
// CHECK: [[AGG_CAPTURED:%.+]] = alloca %struct.anon
// CHECK: [[ARGC_REF:%.+]] = getelementptr inbounds %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0
// CHECK-NEXT: store i32* {{%[a-z0-9.]+}}, i32** [[ARGC_REF]]
// CHECK-NEXT: [[BITCAST:%.+]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
// CHECK-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call(%ident_t* [[DEF_LOC_2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @__captured_stmt to void (i32*, i32*, ...)*), i8* [[BITCAST]])
// CHECK-NEXT: [[ARGV:%.+]] = load i8*** {{%[a-z0-9.]+}}
-// CHECK-NEXT: [[RET:%.+]] = call i32 [[TMAIN:@.+tmain.+]](i8** [[ARGV]])
+// CHECK-NEXT: [[RET:%.+]] = call {{.*}}i32 [[TMAIN:@.+tmain.+]](i8** [[ARGV]])
// CHECK-NEXT: ret i32 [[RET]]
// CHECK-NEXT: }
// CHECK-DEBUG-LABEL: define i32 @main(i32 %argc, i8** %argv)
@@ -68,7 +68,7 @@ int main (int argc, char **argv) {
// CHECK-NEXT: [[ARGC_PTR_REF:%.+]] = getelementptr inbounds %struct.anon* [[CONTEXT_PTR]], i32 0, i32 0
// CHECK-NEXT: [[ARGC_REF:%.+]] = load i32** [[ARGC_PTR_REF]]
// CHECK-NEXT: [[ARGC:%.+]] = load i32* [[ARGC_REF]]
-// CHECK-NEXT: invoke void [[FOO:@.+foo.+]](i32 [[ARGC]])
+// CHECK-NEXT: invoke void [[FOO:@.+foo.+]](i32 {{.*}}[[ARGC]])
// CHECK: ret void
// CHECK: call void @{{.+terminate.*}}(
// CHECK-NEXT: unreachable
@@ -86,12 +86,12 @@ int main (int argc, char **argv) {
// CHECK-DEBUG-NEXT: unreachable
// CHECK-DEBUG-NEXT: }
-// CHECK-DAG: define linkonce_odr void [[FOO]](i32 %argc)
+// CHECK-DAG: define linkonce_odr void [[FOO]](i32 {{.*}}%argc)
// CHECK-DAG: declare void @__kmpc_fork_call(%ident_t*, i32, void (i32*, i32*, ...)*, ...)
// CHECK-DEBUG-DAG: define linkonce_odr void [[FOO]](i32 %argc)
// CHECK-DEBUG-DAG: declare void @__kmpc_fork_call(%ident_t*, i32, void (i32*, i32*, ...)*, ...)
-// CHECK: define linkonce_odr i32 [[TMAIN]](i8** %argc)
+// CHECK: define linkonce_odr {{.*}}i32 [[TMAIN]](i8** %argc)
// CHECK: [[AGG_CAPTURED:%.+]] = alloca %struct.anon.0
// CHECK: [[ARGC_REF:%.+]] = getelementptr inbounds %struct.anon.0* [[AGG_CAPTURED]], i32 0, i32 0
// CHECK-NEXT: store i8*** {{%[a-z0-9.]+}}, i8**** [[ARGC_REF]]
More information about the cfe-commits
mailing list