[llvm] [LLVM][DAGCombiner] Port calculateByteProvider to TypeSize. (PR #148425)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 13 16:47:09 PDT 2025


================
@@ -9248,20 +9249,23 @@ calculateByteProvider(SDValue Op, unsigned Index, unsigned Depth,
     if (!L->isSimple() || L->isIndexed())
       return std::nullopt;
 
-    unsigned NarrowBitWidth = L->getMemoryVT().getSizeInBits();
-    if (NarrowBitWidth % 8 != 0)
+    TypeSize NarrowBitWidth = L->getMemoryVT().getSizeInBits();
----------------
topperc wrote:

Should this be getScalarSizeInBits? The code on line 9260 is trying to figure out if it is in the zero extended part of the load. That should be based on the scalar size not the full vector size.

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


More information about the llvm-commits mailing list