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

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

Issue 927433002: Convert a few lit tests that use "lc2i | llvm-mc | llvm-objdump" to use p2i. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: xx 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
OLDNEW
1 ; This tests some of the subtleties of Phi lowering. In particular, 1 ; This tests some of the subtleties of Phi lowering. In particular,
2 ; it tests that it does the right thing when it tries to enable 2 ; it tests that it does the right thing when it tries to enable
3 ; compare/branch fusing. 3 ; compare/branch fusing.
4 4
5 ; TODO(kschimpf) Find out why lc2i must be used. 5 ; RUN: %p2i -i %s --args -O2 --verbose none --phi-edge-split=0 \
6 ; REQUIRES: allow_llvm_ir_as_input
7 ; RUN: %lc2i -i %s --args -O2 --verbose none --phi-edge-split=0 \
8 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ 6 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
9 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s 7 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
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:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 ; mov dword ptr [ecx+1000], eax 82 ; mov dword ptr [ecx+1000], eax
85 ; ret 83 ; ret
86 ; 84 ;
87 ; This is bad because the final store address is supposed to be the 85 ; This is bad because the final store address is supposed to be the
88 ; same as the load address in the loop, but it has clearly been 86 ; same as the load address in the loop, but it has clearly been
89 ; over-optimized into a null pointer dereference. 87 ; over-optimized into a null pointer dereference.
90 88
91 ; CHECK-LABEL: testPhi3 89 ; CHECK-LABEL: testPhi3
92 ; CHECK: push [[EBX:.*]] 90 ; CHECK: push [[EBX:.*]]
93 ; CHECK: mov {{.*}}, dword ptr [esp 91 ; CHECK: mov {{.*}}, dword ptr [esp
94 ; CHECK: mov 92 ; CHECK: add [[REG1:.*]], 1000
95 ; CHECK: mov {{.*}}[[ADDR:.*1000]] 93 ; CHECK: mov {{.*}}, [[REG1]]
jvoung (off chromium) 2015/02/13 05:13:14 This used to form a more complex addressing mode [
Jim Stichnoth 2015/02/13 14:16:12 This is probably because p2i removes %__4 and %__6
jvoung (off chromium) 2015/02/13 16:40:08 Ah interesting -- make sense. Done.
94 ; CHECK: mov {{.*}}, dword ptr [[ADDR:.*]]
96 ; CHECK: cmp {{.*}}, 0 95 ; CHECK: cmp {{.*}}, 0
97 ; CHECK: jne 96 ; CHECK: jne
98 ; CHECK: mov {{.*}}[[ADDR]] 97 ; CHECK: mov dword ptr [[ADDR]],
99 ; CHECK: pop [[EBX]] 98 ; CHECK: pop [[EBX]]
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll ('k') | tests_lit/llvm2ice_tests/struct-arith.pnacl.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698