[PATCH] D157733: [DAG] NFC: Add getScalarizeExtOrTrunc
Jeffrey Byrnes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 10:18:35 PDT 2023
jrbyrnes 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;
----------------
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 ?
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