[llvm] [SelectionDAG] Use ZERO_EXTEND_VECTOR_INREG for vectors (PR #92048)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 16:28:08 PDT 2024


https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/92048

None

>From dc7454a7eee9cb8a60ade1d9affa895157d0b06e Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at gmail.com>
Date: Mon, 13 May 2024 09:59:57 -0400
Subject: [PATCH] [SelectionDAG] Use ZERO_EXTEND_VECTOR_INREG for vectors

---
 llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index 0aa36deda79dc..2a8794e46e988 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -1508,8 +1508,7 @@ SDValue DAGTypeLegalizer::PromoteIntRes_VPFunnelShift(SDNode *N) {
       !TLI.isOperationLegalOrCustom(Opcode, VT)) {
     SDValue HiShift = DAG.getConstant(OldBits, DL, VT);
     Hi = DAG.getNode(ISD::VP_SHL, DL, VT, Hi, HiShift, Mask, EVL);
-    // FIXME: Replace it by vp operations.
-    Lo = DAG.getZeroExtendInReg(Lo, DL, OldVT);
+    Lo = DAG.getNode(ISD::ZERO_EXTEND_VECTOR_INREG, DL, VT, Lo);
     SDValue Res = DAG.getNode(ISD::VP_OR, DL, VT, Hi, Lo, Mask, EVL);
     Res = DAG.getNode(IsFSHR ? ISD::VP_LSHR : ISD::VP_SHL, DL, VT, Res, Amt,
                       Mask, EVL);



More information about the llvm-commits mailing list