[flang-commits] [libc] [libcxxabi] [clang-tools-extra] [openmp] [mlir] [clang] [flang] [compiler-rt] [libcxx] [llvm] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)
Eli Friedman via flang-commits
flang-commits at lists.llvm.org
Tue Jan 23 11:17:42 PST 2024
================
@@ -21471,6 +21471,57 @@ bool isHalvingTruncateOfLegalScalableType(EVT SrcVT, EVT DstVT) {
(SrcVT == MVT::nxv2i64 && DstVT == MVT::nxv2i32);
}
+// Combine store (trunc X to <3 x i8>) to sequence of ST1.b.
+static SDValue combineI8TruncStore(StoreSDNode *ST, SelectionDAG &DAG,
+ const AArch64Subtarget *Subtarget) {
+ SDValue Value = ST->getValue();
+ EVT ValueVT = Value.getValueType();
+
+ if (ST->isVolatile() || !Subtarget->isLittleEndian() ||
+ ST->getOriginalAlign() >= 4 || Value.getOpcode() != ISD::TRUNCATE ||
----------------
efriedma-quic wrote:
What is `ST->getOriginalAlign() >= 4` protecting against? Increasing the known alignment of the pointer doesn't change the generated code, as far as I can tell.
https://github.com/llvm/llvm-project/pull/78637
More information about the flang-commits
mailing list