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

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

Issue 622113002: Handle GPR and vector shift ops. Handle pmull also. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: test encodings 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
« no previous file with comments | « tests_lit/assembler/x86/opcode_register_encodings.ll ('k') | tests_lit/llvm2ice_tests/address-mode-opt.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/8bit.pnacl.ll
diff --git a/tests_lit/llvm2ice_tests/8bit.pnacl.ll b/tests_lit/llvm2ice_tests/8bit.pnacl.ll
index 2307712468072466976e73f51d0a760f03e3f6d7..0f0e35b816975d0f1a16a4a2c043354c4d1dfa2b 100644
--- a/tests_lit/llvm2ice_tests/8bit.pnacl.ll
+++ b/tests_lit/llvm2ice_tests/8bit.pnacl.ll
@@ -159,6 +159,69 @@ entry:
; CHECK-LABEL: srem8BitConst
; CHECK: idiv {{[abcd]l|byte ptr}}
+define internal i32 @shl8Bit(i32 %a, i32 %b) {
+entry:
+ %a_8 = trunc i32 %a to i8
+ %b_8 = trunc i32 %b to i8
+ %shl = shl i8 %b_8, %a_8
+ %ret = zext i8 %shl to i32
+ ret i32 %ret
+}
+; CHECK-LABEL: shl8Bit
+; CHECK: shl {{[abd]l|byte ptr}}, cl
+
+define internal i32 @shl8BitConst(i32 %a, i32 %b) {
+entry:
+ %a_8 = trunc i32 %a to i8
+ %shl = shl i8 %a_8, 6
+ %ret = zext i8 %shl to i32
+ ret i32 %ret
+}
+; CHECK-LABEL: shl8BitConst
+; CHECK: shl {{[abcd]l|byte ptr}}, 6
+
+define internal i32 @lshr8Bit(i32 %a, i32 %b) {
+entry:
+ %a_8 = trunc i32 %a to i8
+ %b_8 = trunc i32 %b to i8
+ %lshr = lshr i8 %b_8, %a_8
+ %ret = zext i8 %lshr to i32
+ ret i32 %ret
+}
+; CHECK-LABEL: lshr8Bit
+; CHECK: shr {{[abd]l|byte ptr}}, cl
+
+define internal i32 @lshr8BitConst(i32 %a, i32 %b) {
+entry:
+ %a_8 = trunc i32 %a to i8
+ %lshr = lshr i8 %a_8, 6
+ %ret = zext i8 %lshr to i32
+ ret i32 %ret
+}
+; CHECK-LABEL: lshr8BitConst
+; CHECK: shr {{[abcd]l|byte ptr}}, 6
+
+define internal i32 @ashr8Bit(i32 %a, i32 %b) {
+entry:
+ %a_8 = trunc i32 %a to i8
+ %b_8 = trunc i32 %b to i8
+ %ashr = ashr i8 %b_8, %a_8
+ %ret = zext i8 %ashr to i32
+ ret i32 %ret
+}
+; CHECK-LABEL: ashr8Bit
+; CHECK: sar {{[abd]l|byte ptr}}, cl
+
+define internal i32 @ashr8BitConst(i32 %a, i32 %b) {
+entry:
+ %a_8 = trunc i32 %a to i8
+ %ashr = ashr i8 %a_8, 6
+ %ret = zext i8 %ashr to i32
+ ret i32 %ret
+}
+; CHECK-LABEL: ashr8BitConst
+; CHECK: sar {{[abcd]l|byte ptr}}, 6
+
; ERRORS-NOT: ICE translation error
; DUMP-NOT: SZ
« no previous file with comments | « tests_lit/assembler/x86/opcode_register_encodings.ll ('k') | tests_lit/llvm2ice_tests/address-mode-opt.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698