summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/for_codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/OpenMP/for_codegen.cpp')
-rw-r--r--clang/test/OpenMP/for_codegen.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/clang/test/OpenMP/for_codegen.cpp b/clang/test/OpenMP/for_codegen.cpp
index c56fcbce14b..fc35a98c9ed 100644
--- a/clang/test/OpenMP/for_codegen.cpp
+++ b/clang/test/OpenMP/for_codegen.cpp
@@ -329,14 +329,9 @@ void test_precond() {
// CHECK: [[A_ADDR:%.+]] = alloca i8,
// CHECK: [[I_ADDR:%.+]] = alloca i8,
char a = 0;
- // CHECK: store i32 0, i32* [[IV_ADDR:%.+]],
- // CHECK: [[A:%.+]] = load i8, i8* [[A_ADDR]],
- // CHECK: [[CONV:%.+]] = sext i8 [[A]] to i32
- // CHECK: [[IV:%.+]] = load i32, i32* [[IV_ADDR]],
- // CHECK: [[MUL:%.+]] = mul nsw i32 [[IV]], 1
- // CHECK: [[ADD:%.+]] = add nsw i32 [[CONV]], [[MUL]]
- // CHECK: [[CONV:%.+]] = trunc i32 [[ADD]] to i8
- // CHECK: store i8 [[CONV]], i8* [[I_ADDR]],
+ // CHECK: store i8 0,
+ // CHECK: store i32
+ // CHECK: store i8
// CHECK: [[A:%.+]] = load i8, i8* [[A_ADDR]],
// CHECK: [[CONV:%.+]] = sext i8 [[A]] to i32
// CHECK: [[CMP:%.+]] = icmp slt i32 [[CONV]], 10
@@ -482,4 +477,14 @@ void loop_with_It(It<char> begin, It<char> end) {
// CHECK: call void @__kmpc_for_static_init_8(
// CHECK: call void @__kmpc_for_static_fini(
+void loop_with_stmt_expr() {
+#pragma omp for
+ for (int i = __extension__({float b = 0;b; }); i < __extension__({double c = 1;c; }); i += __extension__({char d = 1; d; }))
+ ;
+}
+// CHECK-LABEL: loop_with_stmt_expr
+// CHECK: call i32 @__kmpc_global_thread_num(
+// CHECK: call void @__kmpc_for_static_init_4(
+// CHECK: call void @__kmpc_for_static_fini(
+
#endif // HEADER
OpenPOWER on IntegriCloud