[PATCH] D125680: Correctly legalise stackmap operands

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 10:45:19 PDT 2022


arsenm added a comment.

In D125680#3615526 <https://reviews.llvm.org/D125680#3615526>, @vext01 wrote:

> Diff to previous:

FYI Phabricator gives you this if you look at the history tab



================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2274-2277
+      Ops.push_back(
+          CurDAG->getTargetConstant(StackMaps::ConstantOp, DL, MVT::i64));
+      O = CurDAG->getTargetConstant(
+          cast<ConstantSDNode>(OpNode)->getZExtValue(), DL, It->getValueType());
----------------
vext01 wrote:
> arsenm wrote:
> > You're still fixing this into TargetConstant at selection time instead of upfront when lowering from the IR
> This code is selecting the stackmap live variables.
> 
> The (non-frameindex) live variables can't be emitted to target constants at DAG-build time or they won't get legalized and that's the problem that this change is trying to address.
> 
> Correct me if I'm wrong though.
This is a pretty weird behavior, but does the type actually matter? Could you just unconditionally use 64-bit constants?


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

https://reviews.llvm.org/D125680



More information about the llvm-commits mailing list