Skip to content

Commit

Permalink
[DAG] SimplifyVBinOp - replace FoldConstantVectorArithmetic with Fold…
Browse files Browse the repository at this point in the history
…ConstantArithmetic

Currently FoldConstantArithmetic only handles binops, so replacing other uses of FoldConstantVectorArithmetic (in particular for SETCC nodes), still require more work.
  • Loading branch information
RKSimon committed Nov 7, 2021
1 parent ad523cc commit 0ff1ede
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Expand Up @@ -22308,8 +22308,8 @@ SDValue DAGCombiner::SimplifyVBinOp(SDNode *N) {
SDNodeFlags Flags = N->getFlags();

// See if we can constant fold the vector operation.
if (SDValue Fold = DAG.FoldConstantVectorArithmetic(Opcode, SDLoc(LHS),
LHS.getValueType(), Ops))
if (SDValue Fold = DAG.FoldConstantArithmetic(Opcode, SDLoc(LHS),
LHS.getValueType(), Ops))
return Fold;

// Move unary shuffles with identical masks after a vector binop:
Expand Down

0 comments on commit 0ff1ede

Please sign in to comment.