[llvm] [AArch64] Do not allow anyext load in isEquivalentMaskless (PR #216288)

David Green via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 02:39:47 PDT 2026


================
@@ -28395,6 +28395,8 @@ bool checkValueWidth(SDValue V, unsigned width, ISD::LoadExtType &ExtType) {
     LoadSDNode *LoadNode = cast<LoadSDNode>(V.getNode());
     if ((LoadNode->getMemoryVT() == MVT::i8 && width == 8)
        || (LoadNode->getMemoryVT() == MVT::i16 && width == 16)) {
+      if (LoadNode->getExtensionType() == ISD::EXTLOAD)
----------------
davemgreen wrote:

Done. I think the preference if someone was going to extend this would be to rewrite it using knownbits and maybe make it generic to other targets.

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


More information about the llvm-commits mailing list