[llvm] [AArch64] Combine undef UZP and NVCAST away. (PR #204623)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 3 01:58:34 PDT 2026
=?utf-8?q?Gaƫtan?= Bossu <gaetan.bossu at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/204623 at github.com>
================
@@ -25641,6 +25641,12 @@ static SDValue performUzpCombine(SDNode *N, SelectionDAG &DAG,
SDValue Op1 = N->getOperand(1);
EVT ResVT = N->getValueType(0);
+ // UZP is used to lower insert_subvector quite early. When later DAG combines
+ // run, it's possible to actually end up with an insert of UNDEF into UNDEF,
+ // i.e. UZP1 UNDEF, UNDEF.
+ if (Op0.isUndef() && Op1.isUndef())
+ return DAG.getUNDEF(ResVT);
----------------
sdesmalen-arm wrote:
Regardless of where this comes from, this seems like a sensible combine on its own.
https://github.com/llvm/llvm-project/pull/204623
More information about the llvm-commits
mailing list