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

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

Issue 348373005: Bitcast of 64-bit immediates may need to split the immediate, not a var. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: move and add a comment Created 6 years, 6 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 | « src/IceTargetLoweringX8632.cpp ('k') | tests_lit/llvm2ice_tests/bitcast.ll » ('j') | 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 f942d515d061b6b17682aae8b3181d14d50c5639..32e582851478d7ddfb363f3af45a7f600ffd1e0c 100644
--- a/tests_lit/llvm2ice_tests/64bit.pnacl.ll
+++ b/tests_lit/llvm2ice_tests/64bit.pnacl.ll
@@ -230,6 +230,23 @@ entry:
; OPTM1: call __divdi3
; OPTM1: ret
+define internal i64 @div64BitSignedConst(i64 %a) {
+entry:
+ %div = sdiv i64 %a, 12345678901234
+ ret i64 %div
+}
+; CHECK-LABEL: div64BitSignedConst:
+; CHECK: push 2874
+; CHECK: push 1942892530
+; CHECK: call __divdi3
+; CHECK: ret
+;
+; OPTM1-LABEL: div64BitSignedConst:
+; OPTM1: push 2874
+; OPTM1: push 1942892530
+; OPTM1: call __divdi3
+; OPTM1: ret
+
define internal i64 @div64BitUnsigned(i64 %a, i64 %b) {
entry:
%div = udiv i64 %a, %b
@@ -462,6 +479,31 @@ entry:
; OPTM1: movsx eax,
; OPTM1: ret
+define internal i32 @trunc64To32SignedConst() {
+entry:
+ %conv = trunc i64 12345678901234 to i32
+ ret i32 %conv
+}
+; CHECK-LABEL: trunc64To32SignedConst
+; CHECK: mov eax, 1942892530
+;
+; OPTM1-LABEL: trunc64To32SignedConst
+; OPTM1: mov eax, 1942892530
+
+define internal i32 @trunc64To16SignedConst() {
+entry:
+ %conv = trunc i64 12345678901234 to i16
+ %conv.ret_ext = sext i16 %conv to i32
+ ret i32 %conv.ret_ext
+}
+; CHECK-LABEL: trunc64To16SignedConst
+; CHECK: mov eax, 1942892530
+; CHECK: movsx eax, ax
+;
+; OPTM1-LABEL: trunc64To16SignedConst
+; OPTM1: mov eax, 1942892530
+; OPTM1: movsx eax,
+
define internal i32 @trunc64To32Unsigned(i64 %a) {
entry:
%conv = trunc i64 %a to i32
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | tests_lit/llvm2ice_tests/bitcast.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698