@@ -1591,17 +1591,17 @@ define i32 @fshl32_by_negated(i32 %x, i32 %shamt) {
15911591; X86-LABEL: fshl32_by_negated:
15921592; X86: # %bb.0:
15931593; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
1594- ; X86-NEXT: movl $32 , %ecx
1594+ ; X86-NEXT: xorl %ecx , %ecx
15951595; X86-NEXT: subl {{[0-9]+}}(%esp), %ecx
15961596; X86-NEXT: # kill: def $cl killed $cl killed $ecx
15971597; X86-NEXT: roll %cl, %eax
15981598; X86-NEXT: retl
15991599;
16001600; X64-LABEL: fshl32_by_negated:
16011601; X64: # %bb.0:
1602+ ; X64-NEXT: movl %esi, %ecx
16021603; X64-NEXT: movl %edi, %eax
1603- ; X64-NEXT: movl $32, %ecx
1604- ; X64-NEXT: subl %esi, %ecx
1604+ ; X64-NEXT: negl %ecx
16051605; X64-NEXT: # kill: def $cl killed $cl killed $ecx
16061606; X64-NEXT: roll %cl, %eax
16071607; X64-NEXT: retq
@@ -1615,17 +1615,17 @@ define i32 @fshr32_by_negated(i32 %x, i32 %shamt) {
16151615; X86-LABEL: fshr32_by_negated:
16161616; X86: # %bb.0:
16171617; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
1618- ; X86-NEXT: movl $32 , %ecx
1618+ ; X86-NEXT: xorl %ecx , %ecx
16191619; X86-NEXT: subl {{[0-9]+}}(%esp), %ecx
16201620; X86-NEXT: # kill: def $cl killed $cl killed $ecx
16211621; X86-NEXT: rorl %cl, %eax
16221622; X86-NEXT: retl
16231623;
16241624; X64-LABEL: fshr32_by_negated:
16251625; X64: # %bb.0:
1626+ ; X64-NEXT: movl %esi, %ecx
16261627; X64-NEXT: movl %edi, %eax
1627- ; X64-NEXT: movl $32, %ecx
1628- ; X64-NEXT: subl %esi, %ecx
1628+ ; X64-NEXT: negl %ecx
16291629; X64-NEXT: # kill: def $cl killed $cl killed $ecx
16301630; X64-NEXT: rorl %cl, %eax
16311631; X64-NEXT: retq
@@ -1664,10 +1664,10 @@ define i64 @fshl64_by_negated(i64 %x, i64 %shamt) {
16641664;
16651665; X64-LABEL: fshl64_by_negated:
16661666; X64: # %bb.0:
1667+ ; X64-NEXT: movq %rsi, %rcx
16671668; X64-NEXT: movq %rdi, %rax
1668- ; X64-NEXT: movl $64, %ecx
1669- ; X64-NEXT: subl %esi, %ecx
1670- ; X64-NEXT: # kill: def $cl killed $cl killed $ecx
1669+ ; X64-NEXT: negl %ecx
1670+ ; X64-NEXT: # kill: def $cl killed $cl killed $rcx
16711671; X64-NEXT: rolq %cl, %rax
16721672; X64-NEXT: retq
16731673 %neg = sub i64 64 , %shamt
@@ -1705,10 +1705,10 @@ define i64 @fshr64_by_negated(i64 %x, i64 %shamt) {
17051705;
17061706; X64-LABEL: fshr64_by_negated:
17071707; X64: # %bb.0:
1708+ ; X64-NEXT: movq %rsi, %rcx
17081709; X64-NEXT: movq %rdi, %rax
1709- ; X64-NEXT: movl $64, %ecx
1710- ; X64-NEXT: subl %esi, %ecx
1711- ; X64-NEXT: # kill: def $cl killed $cl killed $ecx
1710+ ; X64-NEXT: negl %ecx
1711+ ; X64-NEXT: # kill: def $cl killed $cl killed $rcx
17121712; X64-NEXT: rorq %cl, %rax
17131713; X64-NEXT: retq
17141714 %neg = sub i64 64 , %shamt
@@ -1722,16 +1722,14 @@ define i32 @fshl32_add_k(i32 %x, i32 %shamt) {
17221722; X86: # %bb.0:
17231723; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
17241724; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
1725- ; X86-NEXT: addl $32, %ecx
17261725; X86-NEXT: # kill: def $cl killed $cl killed $ecx
17271726; X86-NEXT: roll %cl, %eax
17281727; X86-NEXT: retl
17291728;
17301729; X64-LABEL: fshl32_add_k:
17311730; X64: # %bb.0:
1732- ; X64-NEXT: # kill: def $ esi killed $esi def $rsi
1731+ ; X64-NEXT: movl % esi, %ecx
17331732; X64-NEXT: movl %edi, %eax
1734- ; X64-NEXT: leal 32(%rsi), %ecx
17351733; X64-NEXT: # kill: def $cl killed $cl killed $ecx
17361734; X64-NEXT: roll %cl, %eax
17371735; X64-NEXT: retq
@@ -1770,9 +1768,9 @@ define i64 @fshr64_sub_k(i64 %x, i64 %shamt) {
17701768;
17711769; X64-LABEL: fshr64_sub_k:
17721770; X64: # %bb.0:
1771+ ; X64-NEXT: movq %rsi, %rcx
17731772; X64-NEXT: movq %rdi, %rax
1774- ; X64-NEXT: leal -64(%rsi), %ecx
1775- ; X64-NEXT: # kill: def $cl killed $cl killed $ecx
1773+ ; X64-NEXT: # kill: def $cl killed $cl killed $rcx
17761774; X64-NEXT: rorq %cl, %rax
17771775; X64-NEXT: retq
17781776 %k = sub i64 %shamt , 64
0 commit comments