[llvm] [AArch64] Lower factor-of-2 interleaved stores to STNP (PR #177938)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 05:47:27 PST 2026


================
@@ -18465,6 +18465,43 @@ bool hasNearbyPairedStore(Iter It, Iter End, Value *Ptr, const DataLayout &DL) {
   return false;
 }
 
+// Coordinated with STNP handling in
+// `llvm/lib/Target/AArch64/AArch64InstrInfo.td` and
+// `LowerNTStore`
+static bool isLegalNTStore(Type *DataType, Align Alignment,
+                           const DataLayout &DL) {
+  // Currently we only support NT stores lowering for little-endian targets.
+  if (!DL.isLittleEndian())
+    return false;
+
+  // The backend can lower to STNPWi in this case
+  if (DataType->isIntegerTy(64))
+    return true;
+
+  if (auto *DataTypeTy = dyn_cast<FixedVectorType>(DataType)) {
----------------
fhahn wrote:

can turn into early return false to reduce indent.

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


More information about the llvm-commits mailing list