[PATCH] D125076: [SelectionDAG] Clear promoted bits before UREM on shift amount in PromoteIntRes_FunnelShift.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 6 09:00:25 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1280
   SDValue Lo = GetPromotedInteger(N->getOperand(1));
-  SDValue Amt = GetPromotedInteger(N->getOperand(2));
+  SDValue Amt = ZExtPromotedInteger(N->getOperand(2));
 
----------------
Like other shifts/rotates, the shift amount for funnel shifts isn't required to match the data type is it? Should this be checking that the argument needs to be promoted first?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125076/new/

https://reviews.llvm.org/D125076



More information about the llvm-commits mailing list