[llvm] [Mips] ISel zext nneg the same as sext for Mips64. (PR #102852)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 12 00:42:33 PDT 2024
================
@@ -837,13 +837,20 @@ def : MipsPat<(MipsExt (i32 (trunc GPR64:$src)), immZExt5:$pos, immZExt5:$size),
(EXTRACT_SUBREG (DEXT GPR64:$src, immZExt5:$pos, immZExt5:$size), sub_32)>,
ISA_MIPS3, GPR_64;
+def zext_nneg : PatFrag<(ops node:$src), (zext node:$src), [{
+ return N->getFlags().hasNonNeg();
+}]>;
+def sext_like : PatFrags<(ops node:$src),
+ [(zext_nneg node:$src),
+ (sext node:$src)]>;
+
----------------
arsenm wrote:
These probably should go in the general TargetSelectionDAG.td
https://github.com/llvm/llvm-project/pull/102852
More information about the llvm-commits
mailing list