[PATCH] D131482: [RISCV] Return true in hasBitTest for Zbs and add new BINVI pattern for resulting canonicalisation

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 08:48:17 PDT 2022


asb planned changes to this revision.
asb added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoZb.td:902
 
 def : Pat<(and (not (srl GPR:$rs1, uimmlog2xlen:$shamt)), (XLenVT 1)),
           (XORI (BEXTI GPR:$rs1, uimmlog2xlen:$shamt), (XLenVT 1))>;
----------------
craig.topper wrote:
> reames wrote:
> > This pattern looks to be matching the old canonicalization, but oddly, not using the BINV.  
> We can’t use binvi. It doesn’t return a 0 or 1 value.
Oops, that's a silly mistake on my part. I'll respin this patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131482/new/

https://reviews.llvm.org/D131482



More information about the llvm-commits mailing list