[PATCH] D130370: [llvm] Always use Constant for FP_ROUND ISD Nodes

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 04:39:31 PDT 2022


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:20899
     NewValue = DAG.getNode(AArch64ISD::FP_ROUND_MERGE_PASSTHRU, DL, TruncVT, Pg,
-                           NewValue, DAG.getTargetConstant(0, DL, MVT::i64),
+                           NewValue, DAG.getIntPtrConstant(0, DL),
                            DAG.getUNDEF(TruncVT));
----------------
craig.topper wrote:
> Is there any real reason that FP_ROUND_MERGE_PASSTHRU even needs this flag? Or is just because LowerToPredicatedOp doesn't know to drop it?
This stems for a rule we have whereby when trivially extending a common ISD nodes to an AArch64 predicated version, we honour the original's definition.  This just means nobody should be surprised by a node with the sameish name but a different set/order of operands (i.e. the predication is purely additive).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130370



More information about the llvm-commits mailing list