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

Unified Diff: tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll

Issue 402253002: Use lowerCast instead of inlined _movzx, to get legalization, for memset. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 5 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll
diff --git a/tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll b/tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll
index 8a11a84a41306c546fe999b61cb1bfdf5f0e7406..bf0355f3d92679298b339a537e8e28878d0790a3 100644
--- a/tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll
+++ b/tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll
@@ -132,6 +132,7 @@ entry:
ret void
}
; CHECK-LABEL: test_memset
+; CHECK: movzx
; CHECK: call memset
define void @test_memset_const_len_align(i32 %iptr_dst, i32 %wide_val) {
@@ -143,6 +144,18 @@ entry:
ret void
}
; CHECK-LABEL: test_memset_const_len_align
+; CHECK: movzx
+; CHECK: call memset
+
+define void @test_memset_const_val(i32 %iptr_dst, i32 %len) {
+entry:
+ %dst = inttoptr i32 %iptr_dst to i8*
+ call void @llvm.memset.p0i8.i32(i8* %dst, i8 0, i32 %len, i32 1, i1 0)
+ ret void
+}
+; CHECK-LABEL: test_memset_const_val
+; Make sure the argument is legalized (can't movzx reg, 0).
+; CHECK: movzx {{.*}}, {{[^0]}}
; CHECK: call memset
define i32 @test_setjmplongjmp(i32 %iptr_env) {
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698