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

Side by Side Diff: test/Transforms/NaCl/rewrite-flt-rounds.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 9 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
OLDNEW
(Empty)
1 ; RUN: opt < %s -rewrite-llvm-intrinsic-calls -S | FileCheck %s
2 ; RUN: opt < %s -rewrite-llvm-intrinsic-calls -S | FileCheck %s -check-prefix=CL EANED
3 ; Test the @llvm.flt.rounds part of the RewriteLLVMIntrinsics pass
4
5 declare i32 @llvm.flt.rounds()
6
7 ; No declaration or definition of llvm.flt.rounds() should remain.
8 ; CLEANED-NOT: @llvm.flt.rounds
9
10 define i32 @call_flt_rounds() {
11 ; CHECK: call_flt_rounds
12 ; CHECK-NEXT: ret i32 1
13 %val = call i32 @llvm.flt.rounds()
14 ret i32 %val
15 }
16
17 ; A more complex example with a number of calls in several BBs.
18 define i32 @multiple_calls(i64* %arg, i32 %num) {
19 ; CHECK: multiple_calls
20 entryblock:
21 ; CHECK: entryblock
22 %v1 = call i32 @llvm.flt.rounds()
23 br label %block1
24 block1:
25 ; CHECK: block1:
26 ; CHECK-NEXT: %v3 = add i32 1, 1
27 %v2 = call i32 @llvm.flt.rounds()
28 %v3 = add i32 %v2, %v1
29 br label %exitblock
30 exitblock:
31 ; CHECK: exitblock:
32 ; CHECK-NEXT: %v4 = add i32 1, %v3
33 ; CHECK-NEXT: %v6 = add i32 1, %v4
34 %v4 = add i32 %v2, %v3
35 %v5 = call i32 @llvm.flt.rounds()
36 %v6 = add i32 %v5, %v4
37 ret i32 %v6
38 }
OLDNEW
« no previous file with comments | « test/Transforms/NaCl/rewrite-call-with-libfunc-argument.ll ('k') | test/Transforms/NaCl/rewrite-libcalls-wrong-signature.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698