[PATCH] D112536: [DAG] Add functionality for masked truncating store actions

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 1 06:25:44 PDT 2021


paulwalker-arm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:1302-1303
+
+  /// Return true if the specified store with truncation has solution on this
+  /// target.
+  bool isTruncMStoreLegalOrCustom(EVT ValVT, EVT MemVT) const {
----------------
This comment does not make sense to me. What does "has solution" mean?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9849-9855
+  if (MST->isTruncatingStore() && MST->isUnindexed() &&
+      Value.getValueType().isInteger() &&
+      (!isa<ConstantSDNode>(Value) ||
+       !cast<ConstantSDNode>(Value)->isOpaque())) {
+    APInt TruncDemandedBits =
+        APInt::getLowBitsSet(Value.getScalarValueSizeInBits(),
+                             MST->getMemoryVT().getScalarSizeInBits());
----------------
Can you explain why these new DAG combines are required for what is supposed to be an NFC patch?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112536/new/

https://reviews.llvm.org/D112536



More information about the llvm-commits mailing list