summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/integer-overflow.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/integer-overflow.c')
-rw-r--r--test/CodeGen/integer-overflow.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/integer-overflow.c b/test/CodeGen/integer-overflow.c
index 103cc84..1d46065 100644
--- a/test/CodeGen/integer-overflow.c
+++ b/test/CodeGen/integer-overflow.c
@@ -49,4 +49,18 @@ void test1() {
// TRAPV: llvm.sadd.with.overflow.i32({{.*}}, i32 -1)
// TRAPV_HANDLER: foo(
--a;
+
+ // -fwrapv should turn off inbounds for GEP's, PR9256
+ extern int* P;
+ ++P;
+ // DEFAULT: getelementptr inbounds i32*
+ // WRAPV: getelementptr i32*
+ // TRAPV: getelementptr inbounds i32*
+
+ // PR9350: char increment never overflows.
+ extern volatile signed char PR9350;
+ // DEFAULT: add i8 {{.*}}, 1
+ // WRAPV: add i8 {{.*}}, 1
+ // TRAPV: add i8 {{.*}}, 1
+ ++PR9350;
}
OpenPOWER on IntegriCloud