[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:38:58 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:

Consider not assertion happened before, removing the `if` is also fine.

https://github.com/llvm/llvm-project/pull/88284


More information about the llvm-commits mailing list