[PATCH] D120553: [DAG] SelectionDAG::isSplatValue - add initial BITCAST handling
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 06:05:25 PST 2022
pengfei added a comment.
The IR in the tests neither shows bitcast nor small element vector. Are they generated during the lowering? Do we have specific tests for the patch?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2645
+ unsigned SrcBitWidth = SrcVT.getScalarSizeInBits();
+ unsigned BitWidth = V.getScalarValueSizeInBits();
+
----------------
nit: `VT.getScalarSizeInBits()`
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2652
+
+ if (BitWidth == SrcBitWidth)
+ return isSplatValue(Src, DemandedElts, UndefElts, Depth + 1);
----------------
Why do we need a bitcast if both `SrcVT` and `VT` are integer and have the same width? Don't `SrcVT == VT`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120553/new/
https://reviews.llvm.org/D120553
More information about the llvm-commits
mailing list