[llvm] [X86] shouldFoldMaskToVariableShiftPair should be true for scalars up to the biggest legal type (PR #158068)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 3 19:41:27 PDT 2025


================
@@ -3663,11 +3663,8 @@ bool X86TargetLowering::shouldFoldMaskToVariableShiftPair(SDValue Y) const {
   if (VT.isVector())
     return false;
 
-  // 64-bit shifts on 32-bit targets produce really bad bloated code.
-  if (VT == MVT::i64 && !Subtarget.is64Bit())
-    return false;
-
-  return true;
+  unsigned MaxWidth = Subtarget.is64Bit() ? 64 : 32;
----------------
AZero13 wrote:

Not illegal types as those get promoted

https://github.com/llvm/llvm-project/pull/158068


More information about the llvm-commits mailing list