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

Side by Side Diff: tests_lit/reader_tests/phi.ll

Issue 1522433004: eliminate code related to --no-ir-gen (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes suggested by stichnot Created 5 years 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 | « tests_lit/reader_tests/nacl-other-intrinsics.ll ('k') | tests_lit/reader_tests/select.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 ; Test reading phi instructions. 1 ; Test reading phi instructions.
2 2
3 ; RUN: %p2i -i %s --insts | FileCheck %s 3 ; RUN: %p2i -i %s --insts | FileCheck %s
4 ; RUN: %if --need=allow_disable_ir_gen --command \ 4 ; RUN: %p2i -i %s --args -notranslate -timing | \
5 ; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
6 ; RUN: | %if --need=allow_disable_ir_gen --command \
7 ; RUN: FileCheck --check-prefix=NOIR %s 5 ; RUN: FileCheck --check-prefix=NOIR %s
8 6
9 ; TODO(kschimpf) Add forward reference examples. 7 ; TODO(kschimpf) Add forward reference examples.
10 8
11 define internal i32 @testPhi1(i32 %arg) { 9 define internal i32 @testPhi1(i32 %arg) {
12 entry: 10 entry:
13 %cmp1 = icmp sgt i32 %arg, 0 11 %cmp1 = icmp sgt i32 %arg, 0
14 br i1 %cmp1, label %next, label %target 12 br i1 %cmp1, label %next, label %target
15 next: 13 next:
16 br label %target 14 br label %target
17 target: 15 target:
18 %merge = phi i1 [ %cmp1, %entry ], [ false, %next ] 16 %merge = phi i1 [ %cmp1, %entry ], [ false, %next ]
19 %result = zext i1 %merge to i32 17 %result = zext i1 %merge to i32
20 ret i32 %result 18 ret i32 %result
21 } 19 }
22 20
23 ; CHECK: define internal i32 @testPhi1(i32 %arg) { 21 ; CHECK: define internal i32 @testPhi1(i32 %arg) {
24 ; CHECK-NEXT: entry: 22 ; CHECK-NEXT: entry:
25 ; CHECK-NEXT: %cmp1 = icmp sgt i32 %arg, 0 23 ; CHECK-NEXT: %cmp1 = icmp sgt i32 %arg, 0
26 ; CHECK-NEXT: br i1 %cmp1, label %next, label %target 24 ; CHECK-NEXT: br i1 %cmp1, label %next, label %target
27 ; CHECK-NEXT: next: 25 ; CHECK-NEXT: next:
28 ; CHECK-NEXT: br label %target 26 ; CHECK-NEXT: br label %target
29 ; CHECK-NEXT: target: 27 ; CHECK-NEXT: target:
30 ; CHECK-NEXT: %merge = phi i1 [ %cmp1, %entry ], [ false, %next ] 28 ; CHECK-NEXT: %merge = phi i1 [ %cmp1, %entry ], [ false, %next ]
31 ; CHECK-NEXT: %result = zext i1 %merge to i32 29 ; CHECK-NEXT: %result = zext i1 %merge to i32
32 ; CHECK-NEXT: ret i32 %result 30 ; CHECK-NEXT: ret i32 %result
33 ; CHECK-NEXT: } 31 ; CHECK-NEXT: }
34 32
35 ; NOIR: Total across all functions 33 ; NOIR: Total across all functions
OLDNEW
« no previous file with comments | « tests_lit/reader_tests/nacl-other-intrinsics.ll ('k') | tests_lit/reader_tests/select.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698