Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Unified Diff: test/Transforms/InstCombine/overflow.ll

Issue 16042011: PNaCl: Disable parts of InstCombine that introduce *.with.overflow intrinsics (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Transforms/InstCombine/InstCombineCompares.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/InstCombine/overflow.ll
diff --git a/test/Transforms/InstCombine/overflow.ll b/test/Transforms/InstCombine/overflow.ll
index 81ceef8c41cf175f8b943a1a616dd8d72eb61991..d8e3be3c946f4b73baf8028f8ad9db34ab7abcab 100644
--- a/test/Transforms/InstCombine/overflow.ll
+++ b/test/Transforms/InstCombine/overflow.ll
@@ -1,17 +1,24 @@
; RUN: opt -S -instcombine < %s | FileCheck %s
; <rdar://problem/8558713>
+; @LOCALMOD-BEGIN
+; PNaCl does not support the with.overflow intrinsics in its stable
+; ABI, so these optimizations are disabled.
+
+; RUN: opt -S -instcombine < %s | FileCheck %s -check-prefix=PNACL
+; PNACL-NOT: with.overflow
+
declare void @throwAnExceptionOrWhatever()
; CHECK: @test1
define i32 @test1(i32 %a, i32 %b) nounwind ssp {
entry:
-; CHECK-NOT: sext
+; C;HECK-NOT: sext
%conv = sext i32 %a to i64
%conv2 = sext i32 %b to i64
%add = add nsw i64 %conv2, %conv
%add.off = add i64 %add, 2147483648
-; CHECK: llvm.sadd.with.overflow.i32
+; C;HECK: llvm.sadd.with.overflow.i32
%0 = icmp ugt i64 %add.off, 4294967295
br i1 %0, label %if.then, label %if.end
@@ -20,9 +27,9 @@ if.then:
br label %if.end
if.end:
-; CHECK-NOT: trunc
+; C;HECK-NOT: trunc
%conv9 = trunc i64 %add to i32
-; CHECK: ret i32
+; C;HECK: ret i32
ret i32 %conv9
}
@@ -86,7 +93,7 @@ entry:
%add4 = add nsw i32 %add, 128
%cmp = icmp ugt i32 %add4, 255
br i1 %cmp, label %if.then, label %if.end
-; CHECK: llvm.sadd.with.overflow.i8
+; C;HECK: llvm.sadd.with.overflow.i8
if.then: ; preds = %entry
tail call void @throwAnExceptionOrWhatever() nounwind
unreachable
@@ -98,7 +105,7 @@ if.end: ; preds = %entry
}
; CHECK: @test5
-; CHECK: llvm.uadd.with.overflow
+; C;HECK: llvm.uadd.with.overflow
; CHECK: ret i64
define i64 @test5(i64 %a, i64 %b) nounwind ssp {
entry:
@@ -109,7 +116,7 @@ entry:
}
; CHECK: @test6
-; CHECK: llvm.uadd.with.overflow
+; C;HECK: llvm.uadd.with.overflow
; CHECK: ret i64
define i64 @test6(i64 %a, i64 %b) nounwind ssp {
entry:
@@ -120,7 +127,7 @@ entry:
}
; CHECK: @test7
-; CHECK: llvm.uadd.with.overflow
+; C;HECK: llvm.uadd.with.overflow
; CHECK: ret i64
define i64 @test7(i64 %a, i64 %b) nounwind ssp {
entry:
@@ -153,3 +160,5 @@ if.end:
%conv9 = trunc i64 %add to i32
ret i32 %conv9
}
+
+; @LOCALMOD-END
« no previous file with comments | « lib/Transforms/InstCombine/InstCombineCompares.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698