Index: lib/Target/X86/X86ISelDAGToDAG.cpp =================================================================== --- lib/Target/X86/X86ISelDAGToDAG.cpp +++ lib/Target/X86/X86ISelDAGToDAG.cpp @@ -2959,23 +2959,31 @@ } SDValue OrigNBits = NBits; - if (NBits.getValueType() != XVT) { - // Truncate the shift amount. - NBits = CurDAG->getNode(ISD::TRUNCATE, DL, MVT::i8, NBits); - insertDAGNode(*CurDAG, OrigNBits, NBits); + // Truncate the shift amount. + NBits = CurDAG->getNode(ISD::TRUNCATE, DL, MVT::i8, NBits); + insertDAGNode(*CurDAG, OrigNBits, NBits); - // Insert 8-bit NBits into lowest 8 bits of XVT-sized (32 or 64-bit) - // register. All the other bits are undefined, we do not care about them. - SDValue ImplDef = - SDValue(CurDAG->getMachineNode(TargetOpcode::IMPLICIT_DEF, DL, XVT), 0); - insertDAGNode(*CurDAG, OrigNBits, ImplDef); - NBits = - CurDAG->getTargetInsertSubreg(X86::sub_8bit, DL, XVT, ImplDef, NBits); - insertDAGNode(*CurDAG, OrigNBits, NBits); - } + // Insert 8-bit NBits into lowest 8 bits of 32-bit register. + // All the other bits are undefined, we do not care about them. + SDValue ImplDef = SDValue( + CurDAG->getMachineNode(TargetOpcode::IMPLICIT_DEF, DL, MVT::i32), 0); + insertDAGNode(*CurDAG, OrigNBits, ImplDef); + NBits = CurDAG->getTargetInsertSubreg(X86::sub_8bit, DL, MVT::i32, ImplDef, + NBits); + insertDAGNode(*CurDAG, OrigNBits, NBits); if (Subtarget->hasBMI2()) { // Great, just emit the the BZHI.. + if (XVT != MVT::i32) { + // But have to place the bit count into the wide-enough register first. + SDValue ImplDef = SDValue( + CurDAG->getMachineNode(TargetOpcode::IMPLICIT_DEF, DL, XVT), 0); + insertDAGNode(*CurDAG, OrigNBits, ImplDef); + NBits = CurDAG->getTargetInsertSubreg(X86::sub_32bit, DL, XVT, ImplDef, + NBits); + insertDAGNode(*CurDAG, OrigNBits, NBits); + } + SDValue Extract = CurDAG->getNode(X86ISD::BZHI, DL, XVT, X, NBits); ReplaceNode(Node, Extract.getNode()); SelectCode(Extract.getNode()); @@ -2991,7 +2999,7 @@ // Shift NBits left by 8 bits, thus producing 'control'. // This makes the low 8 bits to be zero. SDValue C8 = CurDAG->getConstant(8, DL, MVT::i8); - SDValue Control = CurDAG->getNode(ISD::SHL, DL, XVT, NBits, C8); + SDValue Control = CurDAG->getNode(ISD::SHL, DL, MVT::i32, NBits, C8); insertDAGNode(*CurDAG, OrigNBits, Control); // If the 'X' is *logically* shifted, we can fold that shift into 'control'. @@ -3003,12 +3011,23 @@ "Expected shift amount to be i8"); // Now, *zero*-extend the shift amount. The bits 8...15 *must* be zero! + // We could zext to i16 in some form, but we intentionally don't do that. SDValue OrigShiftAmt = ShiftAmt; - ShiftAmt = CurDAG->getNode(ISD::ZERO_EXTEND, DL, XVT, ShiftAmt); + ShiftAmt = CurDAG->getNode(ISD::ZERO_EXTEND, DL, MVT::i32, ShiftAmt); insertDAGNode(*CurDAG, OrigShiftAmt, ShiftAmt); // And now 'or' these low 8 bits of shift amount into the 'control'. - Control = CurDAG->getNode(ISD::OR, DL, XVT, Control, ShiftAmt); + Control = CurDAG->getNode(ISD::OR, DL, MVT::i32, Control, ShiftAmt); + insertDAGNode(*CurDAG, OrigNBits, Control); + } + + // But have to place the 'control' into the wide-enough register first. + if (XVT != MVT::i32) { + SDValue ImplDef = + SDValue(CurDAG->getMachineNode(TargetOpcode::IMPLICIT_DEF, DL, XVT), 0); + insertDAGNode(*CurDAG, OrigNBits, ImplDef); + Control = CurDAG->getTargetInsertSubreg(X86::sub_32bit, DL, XVT, ImplDef, + Control); insertDAGNode(*CurDAG, OrigNBits, Control); } Index: test/CodeGen/X86/extract-bits.ll =================================================================== --- test/CodeGen/X86/extract-bits.ll +++ test/CodeGen/X86/extract-bits.ll @@ -665,9 +665,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_a0: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -813,7 +813,7 @@ ; X64-BMI1NOTBM-NEXT: movq %rsi, %rcx ; X64-BMI1NOTBM-NEXT: # kill: def $cl killed $cl killed $rcx ; X64-BMI1NOTBM-NEXT: sarq %cl, %rdi -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: bextrq %rdx, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -953,10 +953,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_a1_indexzext: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -1104,9 +1103,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_a2_load: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -1251,10 +1250,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_a3_load_indexzext: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -1399,9 +1397,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_a4_commutative: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -1586,9 +1584,9 @@ ; X64-BMI1NOTBM-LABEL: bextr64_a5_skipextrauses: ; X64-BMI1NOTBM: # %bb.0: ; X64-BMI1NOTBM-NEXT: pushq %rbx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rbx ; X64-BMI1NOTBM-NEXT: movq %rsi, %rdi ; X64-BMI1NOTBM-NEXT: callq use64 @@ -1828,10 +1826,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_32_a1: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: # kill: def $eax killed $eax killed $rax ; X64-BMI1NOTBM-NEXT: retq @@ -2075,10 +2072,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_32_a2: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: # kill: def $eax killed $eax killed $rax ; X64-BMI1NOTBM-NEXT: retq @@ -2666,9 +2662,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_b0: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -2805,10 +2801,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_b1_indexzext: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -2953,9 +2948,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_b2_load: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -3097,10 +3092,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_b3_load_indexzext: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -3242,9 +3236,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_b4_commutative: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -3424,9 +3418,9 @@ ; X64-BMI1NOTBM-LABEL: bextr64_b5_skipextrauses: ; X64-BMI1NOTBM: # %bb.0: ; X64-BMI1NOTBM-NEXT: pushq %rbx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rbx ; X64-BMI1NOTBM-NEXT: movq %rsi, %rdi ; X64-BMI1NOTBM-NEXT: callq use64 @@ -3662,10 +3656,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_32_b1: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: # kill: def $eax killed $eax killed $rax ; X64-BMI1NOTBM-NEXT: retq @@ -3765,10 +3758,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_32_b2: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: # kill: def $eax killed $eax killed $rax ; X64-BMI1NOTBM-NEXT: retq @@ -6135,10 +6127,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_32_c1: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: # kill: def $eax killed $eax killed $rax ; X64-BMI1NOTBM-NEXT: retq @@ -6235,10 +6226,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_32_c2: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: # kill: def $eax killed $eax killed $rax ; X64-BMI1NOTBM-NEXT: retq @@ -6775,9 +6765,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_d0: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -6945,10 +6935,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_d1_indexzext: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -7123,9 +7112,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_d2_load: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -7297,10 +7286,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_d3_load_indexzext: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -7515,9 +7503,9 @@ ; X64-BMI1NOTBM-LABEL: bextr64_d5_skipextrauses: ; X64-BMI1NOTBM: # %bb.0: ; X64-BMI1NOTBM-NEXT: pushq %rbx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rbx ; X64-BMI1NOTBM-NEXT: movq %rsi, %rdi ; X64-BMI1NOTBM-NEXT: callq use64 @@ -7663,9 +7651,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_32_d0: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: # kill: def $eax killed $eax killed $rax ; X64-BMI1NOTBM-NEXT: retq @@ -7762,10 +7750,9 @@ ; ; X64-BMI1NOTBM-LABEL: bextr64_32_d1: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: # kill: def $edx killed $edx def $rdx -; X64-BMI1NOTBM-NEXT: shlq $8, %rdx +; X64-BMI1NOTBM-NEXT: shll $8, %edx ; X64-BMI1NOTBM-NEXT: movzbl %sil, %eax -; X64-BMI1NOTBM-NEXT: orq %rdx, %rax +; X64-BMI1NOTBM-NEXT: orl %edx, %eax ; X64-BMI1NOTBM-NEXT: bextrq %rax, %rdi, %rax ; X64-BMI1NOTBM-NEXT: # kill: def $eax killed $eax killed $rax ; X64-BMI1NOTBM-NEXT: retq Index: test/CodeGen/X86/extract-lowbits.ll =================================================================== --- test/CodeGen/X86/extract-lowbits.ll +++ test/CodeGen/X86/extract-lowbits.ll @@ -354,7 +354,7 @@ ; ; X64-BMI1NOTBM-LABEL: bzhi64_a0: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -439,7 +439,7 @@ ; X64-BMI1NOTBM-LABEL: bzhi64_a1_indexzext: ; X64-BMI1NOTBM: # %bb.0: ; X64-BMI1NOTBM-NEXT: # kill: def $esi killed $esi def $rsi -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -534,7 +534,7 @@ ; ; X64-BMI1NOTBM-LABEL: bzhi64_a2_load: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -629,7 +629,7 @@ ; X64-BMI1NOTBM-LABEL: bzhi64_a3_load_indexzext: ; X64-BMI1NOTBM: # %bb.0: ; X64-BMI1NOTBM-NEXT: # kill: def $esi killed $esi def $rsi -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -716,7 +716,7 @@ ; ; X64-BMI1NOTBM-LABEL: bzhi64_a4_commutative: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -1060,7 +1060,7 @@ ; ; X64-BMI1NOTBM-LABEL: bzhi64_b0: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -1144,7 +1144,7 @@ ; X64-BMI1NOTBM-LABEL: bzhi64_b1_indexzext: ; X64-BMI1NOTBM: # %bb.0: ; X64-BMI1NOTBM-NEXT: # kill: def $esi killed $esi def $rsi -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -1234,7 +1234,7 @@ ; ; X64-BMI1NOTBM-LABEL: bzhi64_b2_load: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -1324,7 +1324,7 @@ ; X64-BMI1NOTBM-LABEL: bzhi64_b3_load_indexzext: ; X64-BMI1NOTBM: # %bb.0: ; X64-BMI1NOTBM-NEXT: # kill: def $esi killed $esi def $rsi -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -1410,7 +1410,7 @@ ; ; X64-BMI1NOTBM-LABEL: bzhi64_b4_commutative: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -3120,7 +3120,7 @@ ; ; X64-BMI1NOTBM-LABEL: bzhi64_d0: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -3258,7 +3258,7 @@ ; X64-BMI1NOTBM-LABEL: bzhi64_d1_indexzext: ; X64-BMI1NOTBM: # %bb.0: ; X64-BMI1NOTBM-NEXT: # kill: def $esi killed $esi def $rsi -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, %rdi, %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -3400,7 +3400,7 @@ ; ; X64-BMI1NOTBM-LABEL: bzhi64_d2_load: ; X64-BMI1NOTBM: # %bb.0: -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ; @@ -3542,7 +3542,7 @@ ; X64-BMI1NOTBM-LABEL: bzhi64_d3_load_indexzext: ; X64-BMI1NOTBM: # %bb.0: ; X64-BMI1NOTBM-NEXT: # kill: def $esi killed $esi def $rsi -; X64-BMI1NOTBM-NEXT: shlq $8, %rsi +; X64-BMI1NOTBM-NEXT: shll $8, %esi ; X64-BMI1NOTBM-NEXT: bextrq %rsi, (%rdi), %rax ; X64-BMI1NOTBM-NEXT: retq ;