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

Unified Diff: tests_lit/llvm2ice_tests/64bit.pnacl.ll

Issue 652633002: Subzero: Improve performance of liveness analysis and live range construction. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix non-debug build Created 6 years, 2 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
« src/IceTargetLoweringX8632.cpp ('K') | « src/IceTimerTree.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/64bit.pnacl.ll
diff --git a/tests_lit/llvm2ice_tests/64bit.pnacl.ll b/tests_lit/llvm2ice_tests/64bit.pnacl.ll
index cd6cdbac4e1c3905f0760b40dc2bb83d147d72de..0ba403cbebe1d43b697a1deba5b03401ba68c91a 100644
--- a/tests_lit/llvm2ice_tests/64bit.pnacl.ll
+++ b/tests_lit/llvm2ice_tests/64bit.pnacl.ll
@@ -317,6 +317,24 @@ entry:
; OPTM1: test {{.*}}, 32
; OPTM1: je
+define internal i32 @shl64BitSignedTrunc(i64 %a, i64 %b) {
+entry:
+ %shl = shl i64 %a, %b
+ %result = trunc i64 %shl to i32
+ ret i32 %result
+}
+; CHECK-LABEL: shl64BitSignedTrunc
+; CHECK: mov
+; CHECK: shl e
+; CHECK: test {{.*}}, 32
+; CHECK: je
+;
+; OPTM1-LABEL: shl64BitSignedTrunc
+; OPTM1: shld
+; OPTM1: shl e
+; OPTM1: test {{.*}}, 32
+; OPTM1: je
+
define internal i64 @shl64BitUnsigned(i64 %a, i64 %b) {
entry:
%shl = shl i64 %a, %b
@@ -353,6 +371,25 @@ entry:
; OPTM1: je
; OPTM1: sar {{.*}}, 31
+define internal i32 @shr64BitSignedTrunc(i64 %a, i64 %b) {
+entry:
+ %shr = ashr i64 %a, %b
+ %result = trunc i64 %shr to i32
+ ret i32 %result
+}
+; CHECK-LABEL: shr64BitSignedTrunc
+; CHECK: shrd
+; CHECK: sar
+; CHECK: test {{.*}}, 32
+; CHECK: je
+;
+; OPTM1-LABEL: shr64BitSignedTrunc
+; OPTM1: shrd
+; OPTM1: sar
+; OPTM1: test {{.*}}, 32
+; OPTM1: je
+; OPTM1: sar {{.*}}, 31
jvoung (off chromium) 2014/10/13 20:50:50 could the CHECK also check sar ..., 31 to be consi
Jim Stichnoth 2014/10/13 23:15:22 No - with O2 (liveness analysis + DCE), the result
+
define internal i64 @shr64BitUnsigned(i64 %a, i64 %b) {
entry:
%shr = lshr i64 %a, %b
@@ -370,6 +407,24 @@ entry:
; OPTM1: test {{.*}}, 32
; OPTM1: je
+define internal i32 @shr64BitUnsignedTrunc(i64 %a, i64 %b) {
+entry:
+ %shr = lshr i64 %a, %b
+ %result = trunc i64 %shr to i32
+ ret i32 %result
+}
+; CHECK-LABEL: shr64BitUnsignedTrunc
+; CHECK: shrd
+; CHECK: shr
+; CHECK: test {{.*}}, 32
+; CHECK: je
+;
+; OPTM1-LABEL: shr64BitUnsignedTrunc
+; OPTM1: shrd
+; OPTM1: shr
+; OPTM1: test {{.*}}, 32
+; OPTM1: je
+
define internal i64 @and64BitSigned(i64 %a, i64 %b) {
entry:
%and = and i64 %b, %a
« src/IceTargetLoweringX8632.cpp ('K') | « src/IceTimerTree.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698