[PATCH] D157733: [DAG] NFC: Add getScalarizeExtOrTrunc
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 10:34:07 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1464-1467
+ auto Size = Op.getValueSizeInBits();
+ DestOp = getBitcast(MVT::getIntegerVT(Size), Op);
+ if (DestOp.getValueType() == VT)
+ return DestOp;
----------------
jrbyrnes wrote:
> arsenm wrote:
> > Is this just getExtOrTrunc plus a bitcast (plus support for any_extend?) a get*ExtOrTrunc with the extension type as an argument would be more general
> It sounds like you are suggesting `getAnyExtOrTrunc` `getZExtOrTrunc` etc ? These already exist, so then I should just abandon this.
>
> Or did you perhaps mean `getScalarizeZExtOrTrunc` `getScalarizeAnyExtOrTrunc` which does the above but first converts potential vector VT to scalar ?
>
No, there's still a gap to be filled here. There isn't one that handles sext zext and anyext. Not quite sure if bitcast should be worked into it
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157733/new/
https://reviews.llvm.org/D157733
More information about the llvm-commits
mailing list