================ @@ -7230,6 +7234,20 @@ static bool findEltLoadSrc(SDValue Elt, LoadSDNode *&Ld, int64_t &ByteOffset) { } } break; + case ISD::EXTRACT_ELEMENT: + if (auto *IdxC = dyn_cast<ConstantSDNode>(Elt.getOperand(1))) { ---------------- jofrn wrote:
If it isn't a constant, shall we assert false or abort the transform? Right now it aborts the transform. If we know it always is and will be constant, I guess asserting is better. Separately as in another PR? There would be no associated test change as this is required for the optimization. Yes, if we use the ones already implemented here, then we will be able to discover the `ByteOffset`. Why do we want to avoid EXTRACT_ELEMENT? It seems to work here. https://github.com/llvm/llvm-project/pull/125432 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits