[PATCH] D139394: [RISCV] Add support for RISCV XVentanaCondOps Extension Patterns

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 15:05:43 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/select.ll:287
+;
+; CONDOPS-LABEL: select_add_1:
+; CONDOPS:       # %bb.0: # %entry
----------------
reames wrote:
> We should be able to do better here since 0 is the identity constant for the add.
> 
> We should be able to lower this as (add (select cond, a, 0), b).  There should only need a single vt.maskc here.
InstCombine already does that transform before we get to SelectionDAG so it might not be an issue in practice.


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

https://reviews.llvm.org/D139394



More information about the llvm-commits mailing list