[llvm] [DAGCombiner] Require same type of splat & element for build_vector (PR #88284)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 10 20:28:12 PDT 2024
================
@@ -23429,17 +23429,21 @@ SDValue DAGCombiner::visitBUILD_VECTOR(SDNode *N) {
// TODO: Maybe this is useful for non-splat too?
if (!LegalOperations) {
if (SDValue Splat = cast<BuildVectorSDNode>(N)->getSplatValue()) {
----------------
phoebewang wrote:
The old code seems problematic, if we use `cast`, we don't need to use `if`.
https://github.com/llvm/llvm-project/pull/88284
More information about the llvm-commits
mailing list