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

Side by Side Diff: test/Transforms/InstCombine/overflow.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « test/NaCl/X86/stack-adjust.ll ('k') | test/Transforms/InstCombine/overflow-mul.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; RUN: opt -S -instcombine < %s | FileCheck %s 1 ; RUN: opt -S -instcombine < %s | FileCheck %s
2 ; <rdar://problem/8558713> 2 ; <rdar://problem/8558713>
3 3
4 ; @LOCALMOD-BEGIN
5 ; PNaCl does not support the with.overflow intrinsics in its stable
6 ; ABI, so these optimizations are disabled.
7
8 ; RUN: opt -S -instcombine -mtriple=le32-nacl < %s | FileCheck %s -check-prefix= PNACL
9 ; PNACL-NOT: with.overflow
10 ; @LOCALMOD-END
11
4 declare void @throwAnExceptionOrWhatever() 12 declare void @throwAnExceptionOrWhatever()
5 13
6 ; CHECK-LABEL: @test1( 14 ; CHECK-LABEL: @test1(
7 define i32 @test1(i32 %a, i32 %b) nounwind ssp { 15 define i32 @test1(i32 %a, i32 %b) nounwind ssp {
8 entry: 16 entry:
9 ; CHECK-NOT: sext 17 ; CHECK-NOT: sext
10 %conv = sext i32 %a to i64 18 %conv = sext i32 %a to i64
11 %conv2 = sext i32 %b to i64 19 %conv2 = sext i32 %b to i64
12 %add = add nsw i64 %conv2, %conv 20 %add = add nsw i64 %conv2, %conv
13 %add.off = add i64 %add, 2147483648 21 %add.off = add i64 %add, 2147483648
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 br i1 %0, label %if.then, label %if.end 154 br i1 %0, label %if.then, label %if.end
147 155
148 if.then: 156 if.then:
149 tail call void @throwAnExceptionOrWhatever() nounwind 157 tail call void @throwAnExceptionOrWhatever() nounwind
150 br label %if.end 158 br label %if.end
151 159
152 if.end: 160 if.end:
153 %conv9 = trunc i64 %add to i32 161 %conv9 = trunc i64 %add to i32
154 ret i32 %conv9 162 ret i32 %conv9
155 } 163 }
OLDNEW
« no previous file with comments | « test/NaCl/X86/stack-adjust.ll ('k') | test/Transforms/InstCombine/overflow-mul.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698