[llvm] [MIPS] Fix missing ANDI optimization (PR #97689)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 4 17:52:37 PDT 2024
================
@@ -830,6 +830,12 @@ def : MipsPat<(sra GPR64:$rt, (i32 (trunc GPR64:$rs))),
def : MipsPat<(rotr GPR64:$rt, (i32 (trunc GPR64:$rs))),
(DROTRV GPR64:$rt, (EXTRACT_SUBREG GPR64:$rs, sub_32))>,
ISA_MIPS3, GPR_64;
+def : MipsPat<(and (srl (i32 (trunc GPR64:$src)), immZExt5:$imm5), immZExt5:$value),
----------------
topperc wrote:
Can the `and` immediate be larger than 5 bits? I'm not very familiar with Mips encodings.
https://github.com/llvm/llvm-project/pull/97689
More information about the llvm-commits
mailing list