[PATCH] D134881: [RISCV] Branchless lowering for select (and (x , 0x1) == 0), y, (z ^ y) ) and select (and (x , 0x1) == 0), y, (z | y) )

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 29 10:12:29 PDT 2022


reames updated this revision to Diff 463952.
reames added a comment.

Restructure as a post-legalize combine on SELECT_CC.  Doing this as a combine on SETCC before legalization turns out to be annoying as the forms for the inverse icmp looks very different in the DAG (select vs setcc, swapped operands, and a truncate instead of an and).


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

https://reviews.llvm.org/D134881

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134881.463952.patch
Type: text/x-patch
Size: 7631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220929/5141206a/attachment.bin>


More information about the llvm-commits mailing list