[llvm] [RISCV] Fold (vXi8 (trunc (vselect (setltu, X, 256), X, (sext (setgt X, 0))))) to vmax+vnclipu. (PR #94720)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 09:55:00 PDT 2024
- Previous message: [llvm] [RISCV] Fold (vXi8 (trunc (vselect (setltu, X, 256), X, (sext (setgt X, 0))))) to vmax+vnclipu. (PR #94720)
- Next message: [llvm] [RISCV] Fold (vXi8 (trunc (vselect (setltu, X, 256), X, (sext (setgt X, 0))))) to vmax+vnclipu. (PR #94720)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
================
@@ -13370,6 +13371,76 @@ static SDValue combineDeMorganOfBoolean(SDNode *N, SelectionDAG &DAG) {
return DAG.getNode(ISD::XOR, DL, VT, Logic, DAG.getConstant(1, DL, VT));
}
+// Fold (vXi8 (trunc (vselect (setltu, X, 256), X, (sext (setgt X, 0))))) to
----------------
topperc wrote:
> If we have (vselect (X > 0), 255, 0) - and variants - do we reliably combine that into the sext of condition form?
I think InstCombine and DAGCombine both will from a quick test.
https://github.com/llvm/llvm-project/pull/94720
- Previous message: [llvm] [RISCV] Fold (vXi8 (trunc (vselect (setltu, X, 256), X, (sext (setgt X, 0))))) to vmax+vnclipu. (PR #94720)
- Next message: [llvm] [RISCV] Fold (vXi8 (trunc (vselect (setltu, X, 256), X, (sext (setgt X, 0))))) to vmax+vnclipu. (PR #94720)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list