summaryrefslogtreecommitdiffstats
path: root/clang/test/Misc/loop-opt-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Misc/loop-opt-setup.c')
-rw-r--r--clang/test/Misc/loop-opt-setup.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Misc/loop-opt-setup.c b/clang/test/Misc/loop-opt-setup.c
new file mode 100644
index 00000000000..8d3835b4489
--- /dev/null
+++ b/clang/test/Misc/loop-opt-setup.c
@@ -0,0 +1,12 @@
+// RUN: %clang -O1 -fexperimental-new-pass-manager -fno-unroll-loops -S -o - %s -emit-llvm | FileCheck %s
+// RUN: %clang -O1 -fno-unroll-loops -S -o - %s -emit-llvm | FileCheck %s
+extern int a[16];
+int b = 0;
+int foo(void) {
+#pragma unroll
+ for (int i = 0; i < 16; ++i)
+ a[i] = b += 2;
+ return b;
+}
+// CHECK-NOT: br i1
+
OpenPOWER on IntegriCloud