[PATCH] D88225: [DAG] Fold vector mul(x,0)/mul(x,1) to a clearing mask
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 10:48:28 PDT 2020
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3727
+ SDLoc DL(N);
+ SDValue Zero = DAG.getConstant(0, DL, VT.getScalarType());
+ SDValue AllOnes = DAG.getAllOnesConstant(DL, VT.getScalarType());
----------------
Does this work correctly after type legalization if VT.getScalarType() isn't legal? Though maybe that can't happen because we're already looking at a build vector constants?
There's also the case that the scalar type for the constant needs to be larger than the scalar type of the vector.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88225/new/
https://reviews.llvm.org/D88225
More information about the llvm-commits
mailing list