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

Unified 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: comment 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/phi.ll
diff --git a/tests_lit/llvm2ice_tests/phi.ll b/tests_lit/llvm2ice_tests/phi.ll
index 0099fed742a4eec70426ed7709df758d48deba6f..83fdee5182587dd1d9de3aab67a55927d32a4b36 100644
--- a/tests_lit/llvm2ice_tests/phi.ll
+++ b/tests_lit/llvm2ice_tests/phi.ll
@@ -2,9 +2,7 @@
; it tests that it does the right thing when it tries to enable
; compare/branch fusing.
-; TODO(kschimpf) Find out why lc2i must be used.
-; REQUIRES: allow_llvm_ir_as_input
-; RUN: %lc2i -i %s --args -O2 --verbose none --phi-edge-split=0 \
+; RUN: %p2i -i %s --args -O2 --verbose none --phi-edge-split=0 \
; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
@@ -58,12 +56,17 @@ entry:
body:
%merge = phi i32 [ %arg, %entry ], [ %elt, %body ]
%interior = add i32 %merge, 1000
- %__4 = inttoptr i32 %interior to i32*
+ ; Trick to make a basic block local copy of interior for
+ ; addressing mode optimization.
+ %interior__4 = add i32 %interior, 0
+ %__4 = inttoptr i32 %interior__4 to i32*
%elt = load i32* %__4, align 1
%cmp = icmp eq i32 %elt, 0
br i1 %cmp, label %exit, label %body
exit:
- %__6 = inttoptr i32 %interior to i32*
+ ; Same trick (making a basic block local copy).
+ %interior__6 = add i32 %interior, 0
+ %__6 = inttoptr i32 %interior__6 to i32*
store i32 %arg, i32* %__6, align 1
ret i32 %arg
}
@@ -92,8 +95,8 @@ exit:
; CHECK: push [[EBX:.*]]
; CHECK: mov {{.*}}, dword ptr [esp
; CHECK: mov
-; CHECK: mov {{.*}}[[ADDR:.*1000]]
+; CHECK: mov {{.*}}, dword ptr [[ADDR:.*1000]]
; CHECK: cmp {{.*}}, 0
; CHECK: jne
-; CHECK: mov {{.*}}[[ADDR]]
+; CHECK: mov dword ptr [[ADDR]]
; CHECK: pop [[EBX]]
« 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