diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-11-01 22:13:39 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-11-01 22:13:39 +0000 |
commit | bb12243a487e70c0e65bcebdaa12ad754f92e022 (patch) | |
tree | 81b53d4d0c42eb8d80da26ad835b6793856d0ce1 /test/CodeGen/trapv.c | |
parent | 54c45453359b47646a1c8d072b02f628b7e16eaa (diff) |
Remove divison-by-zero checks from -ftrapv. These checks were incompatible with
g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still
available under -fcatch-undefined-behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/trapv.c')
-rw-r--r-- | test/CodeGen/trapv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/trapv.c b/test/CodeGen/trapv.c index a259ebddae..bc8bc70063 100644 --- a/test/CodeGen/trapv.c +++ b/test/CodeGen/trapv.c @@ -50,3 +50,12 @@ void test2() { // CHECK-NEXT: br i1 [[T5]] // CHECK: call void @llvm.trap() } + +// CHECK: define void @test3( +void test3(int a, int b, float c, float d) { + // CHECK-NOT: @llvm.trap + (void)(a / b); + (void)(a % b); + (void)(c / d); + // CHECK: } +} |