[llvm] [X86][DAGCombiner][SelectionDAG] - Fold Zext Build Vector to Bitcast of widen Build Vector (PR #135010)
Rohit Aggarwal via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 24 23:44:21 PDT 2025
================
@@ -14195,6 +14195,66 @@ static SDValue widenAbs(SDNode *Extend, SelectionDAG &DAG) {
return DAG.getZExtOrTrunc(NewAbs, SDLoc(Extend), VT);
}
+// Try to widen the build vector and bitcast it to the type of zext.
+// This is a special case for the 128-bit vector types. Intention is to remove
+// the zext and replace it with a bitcast the wider type. While lowering
+// the bitcast is removed and extra commutation due to zext is avoided.
----------------
rohitaggarwal007 wrote:
@arsenm Add such comment like zext(build_vec) -> bitcast(build_vec). which visualize the transformation, right?
https://github.com/llvm/llvm-project/pull/135010
More information about the llvm-commits
mailing list