aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/exprs.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/exprs.c')
-rw-r--r--test/CodeGen/exprs.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/CodeGen/exprs.c b/test/CodeGen/exprs.c
index d82cbf48d3..a90ae58dc3 100644
--- a/test/CodeGen/exprs.c
+++ b/test/CodeGen/exprs.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o -
+// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
// PR1895
// sizeof function
@@ -119,3 +119,16 @@ void f9(struct S *x) {
void f10() {
__builtin_sin(0);
}
+
+// Tests for signed integer overflow stuff.
+// rdar://7432000
+void f11() {
+ // CHECK: define void @f11
+ extern volatile int f11G, a, b;
+ // CHECK: add nsw i32
+ f11G = a + b;
+ // CHECK: sub nsw i32
+ f11G = a - b;
+ // CHECK: sub nsw i32 0,
+ f11G = -a;
+}