summaryrefslogtreecommitdiff
path: root/test/CodeGen/exact-div-expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/exact-div-expr.c')
-rw-r--r--test/CodeGen/exact-div-expr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGen/exact-div-expr.c b/test/CodeGen/exact-div-expr.c
new file mode 100644
index 0000000000000..a2c12a0b3f6e8
--- /dev/null
+++ b/test/CodeGen/exact-div-expr.c
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - -O1 | grep ashr
+// RUN: %clang_cc1 -emit-llvm %s -o - -O1 | not grep sdiv
+
+long long test(int *A, int *B) {
+ return A-B;
+}