[llvm] [AArch64] Align nontemporal store/load little-endian checks (PR #177468)

Tomer Shafir via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 27 07:17:10 PST 2026


================
@@ -405,17 +406,34 @@ class AArch64TTIImpl final : public BasicTTIImplBase<AArch64TTIImpl> {
       return NumElements > 1 && isPowerOf2_64(NumElements) && EltSize >= 8 &&
              EltSize <= 128 && isPowerOf2_64(EltSize);
     }
-    return BaseT::isLegalNTStore(DataType, Alignment);
+    return std::nullopt;
   }
 
   bool isLegalNTStore(Type *DataType, Align Alignment) const override {
-    return isLegalNTStoreLoad(DataType, Alignment);
+    // Currently we only support NT stores lowering for little-endian targets.
+    //
+    // Coordinated with STNP constraints in
+    // `llvm/lib/Target/AArch64/AArch64InstrInfo.td` and
+    // `AArch64TargetLowering::LowerNTStore`
+    if (!ST->isLittleEndian())
----------------
tomershafir wrote:

I think we shoudn't - its a common utility for both load and store checks, and endianness support can in theory be different for them. Thus it lets the caller own the this check, and it happens that currently both load and store has the same support.

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


More information about the llvm-commits mailing list