[llvm] [RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (PR #82506)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 20:06:12 PST 2024


================
@@ -3261,14 +3262,14 @@ static std::optional<VIDSequence> isSimpleVIDSequence(SDValue Op) {
       if (!isa<ConstantSDNode>(Op.getOperand(Idx)))
         return std::nullopt;
       Val = Op.getConstantOperandVal(Idx) &
-            maskTrailingOnes<uint64_t>(EltSizeInBits);
+            maskTrailingOnes<uint64_t>(Op.getScalarValueSizeInBits());
----------------
lukel97 wrote:

I think we can also reduce the number of usages by only creating the list of integers once. I'll try and create a PR for this.

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


More information about the llvm-commits mailing list