Skip to content

Commit

Permalink
[SelectionDAG] Remove unneeded vector resize from the end of FoldCons…
Browse files Browse the repository at this point in the history
…tantArithmetic. NFC

There's an assert right before that makes sure the size already matches.
Earlier in this function's life, scalars and vectors shared more
code.
  • Loading branch information
topperc committed Mar 31, 2021
1 parent 9c61c76 commit 9e00b66
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5150,9 +5150,6 @@ SDValue SelectionDAG::FoldConstantArithmetic(unsigned Opcode, const SDLoc &DL,
assert(VT.getVectorNumElements() == Outputs.size() &&
"Vector size mismatch!");

// We may have a vector type but a scalar result. Create a splat.
Outputs.resize(VT.getVectorNumElements(), Outputs.back());

// Build a big vector out of the scalar elements we generated.
return getBuildVector(VT, SDLoc(), Outputs);
}
Expand Down

0 comments on commit 9e00b66

Please sign in to comment.