[llvm] [SelectionDAG] Allow vselect in foldBinOpIntoSelect (PR #143283)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 15 02:42:46 PDT 2025
================
@@ -13435,7 +13438,7 @@ static SDValue tryToFoldExtendOfConstant(SDNode *N, const SDLoc &DL,
// fold (sext (select cond, c1, c2)) -> (select cond, sext c1, sext c2)
// fold (zext (select cond, c1, c2)) -> (select cond, zext c1, zext c2)
// fold (aext (select cond, c1, c2)) -> (select cond, sext c1, sext c2)
- if (N0->getOpcode() == ISD::SELECT) {
+ if (N0->getOpcode() == ISD::SELECT || N0->getOpcode() == ISD::VSELECT) {
----------------
RKSimon wrote:
Split this and the fmul negation changes into their own patches with test coverage
https://github.com/llvm/llvm-project/pull/143283
More information about the llvm-commits
mailing list