[PATCH] D155328: [RISCV] Add a DAG combine for (czero_eq X, (xor Y, 1)) -> (czero_ne X, Y) if Y is 0 or 1.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 12:14:04 PDT 2023


craig.topper created this revision.
craig.topper added a reviewer: asb.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: wangpc, eopXD, MaskRay.
Herald added a project: LLVM.

This is an alternative to D155288 <https://reviews.llvm.org/D155288> that can handle other sources of
xori like FP compares. Unfortunately, it misses the i64 setge case
on RV32 in condops.ll.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155328

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/condops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155328.540530.patch
Type: text/x-patch
Size: 5008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230714/8322fde7/attachment.bin>


More information about the llvm-commits mailing list