[PATCH] D102854: [RISCV] Optimize or/xor with immediate in the zbs extension

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 20 11:58:29 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoB.td:122
+    return false;
+  // Bit 11 of imm must be 0, otherwise i0 will be negative. And all bits
+  // beyond bit 11 of r will be set.
----------------
What if bit 11 is the most significant set bit. We can use BSETI/BINVI for it and leave bits 10:0 for the ORI/XORI


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102854



More information about the llvm-commits mailing list