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

Unified Diff: tests_lit/assembler/x86/immediate_encodings.ll

Issue 1146803002: Subzero: Strength-reduce mul by certain constants. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove a TODO Created 5 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/strength-reduce.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/assembler/x86/immediate_encodings.ll
diff --git a/tests_lit/assembler/x86/immediate_encodings.ll b/tests_lit/assembler/x86/immediate_encodings.ll
index c829f1b21e14ab68d26cee36ecd6c0dc1682712b..0c96720d03ba20e87ceeaea41a2fe3a8edce4377 100644
--- a/tests_lit/assembler/x86/immediate_encodings.ll
+++ b/tests_lit/assembler/x86/immediate_encodings.ll
@@ -197,25 +197,25 @@ entry:
define internal i32 @testMul16Imm16(i32 %arg) {
entry:
%arg_i16 = trunc i32 %arg to i16
- %tmp = mul i16 %arg_i16, 1024
+ %tmp = mul i16 %arg_i16, 1025
%result_i16 = add i16 %tmp, 1
%result = zext i16 %result_i16 to i32
ret i32 %result
}
; CHECK-LABEL: testMul16Imm16
-; CHECK: 66 69 c0 00 04 imul ax,ax
+; CHECK: 66 69 c0 01 04 imul ax,ax
; CHECK-NEXT: add ax,0x1
define internal i32 @testMul16Imm16Neg(i32 %arg) {
entry:
%arg_i16 = trunc i32 %arg to i16
- %tmp = mul i16 %arg_i16, -256
+ %tmp = mul i16 %arg_i16, -255
%result_i16 = add i16 %tmp, 1
%result = zext i16 %result_i16 to i32
ret i32 %result
}
; CHECK-LABEL: testMul16Imm16Neg
-; CHECK: 66 69 c0 00 ff imul ax,ax
+; CHECK: 66 69 c0 01 ff imul ax,ax,0xff01
; CHECK-NEXT: add ax,0x1
define internal i32 @testMul32Imm8(i32 %arg) {
@@ -236,19 +236,19 @@ entry:
define internal i32 @testMul32Imm16(i32 %arg) {
entry:
- %result = mul i32 %arg, 1024
+ %result = mul i32 %arg, 1025
ret i32 %result
}
; CHECK-LABEL: testMul32Imm16
-; CHECK: 69 c0 00 04 00 00 imul eax,eax
+; CHECK: 69 c0 01 04 00 00 imul eax,eax
define internal i32 @testMul32Imm16Neg(i32 %arg) {
entry:
- %result = mul i32 %arg, -256
+ %result = mul i32 %arg, -255
ret i32 %result
}
; CHECK-LABEL: testMul32Imm16Neg
-; CHECK: 69 c0 00 ff ff ff imul eax,eax
+; CHECK: 69 c0 01 ff ff ff imul eax,eax,0xffffff01
; The GPR shift instructions either allow an 8-bit immediate or
; have a special encoding for "1".
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | tests_lit/llvm2ice_tests/strength-reduce.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698