[PATCH] D94535: [RISCV] Optimize Branch Comparisons

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 14:11:41 PST 2021


lenary marked 2 inline comments as done.
lenary added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:972
 def : Pat<(brcond GPR:$cond, bb:$imm12), (BNE GPR:$cond, X0, bb:$imm12)>;
+def : Pat<(brcond (XLenVT (xor GPR:$cond, 1)), bb:$imm12),
+          (BEQ GPR:$cond, X0, bb:$imm12)>;
----------------
jrtc27 wrote:
> Hmm, it's a shame `not` is an alias for `(xor $arg, -1)`.
Yeah, this importantly is boolean not, rather than bitwise not.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94535



More information about the llvm-commits mailing list