[PATCH] D59096: [SelectionDAG][RISCV] Add a SELECT_PARTS SelectionDAG node

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 11:41:22 PST 2019


efriedma added a comment.

I'm not sure generating SELECT_PARTS in type legalization is the best approach.  Instead of specifically considering the case of a SELECT whose result is split by legalization exactly once, you could more generally consider DAGs which, after type legalization, contain multiple SELECTs with the same condition.

The x86 backend actually has some code to try improve the lowering for this sort of construct after isel, in cases where there is no native cmov instruction; see X86TargetLowering::EmitLoweredSelect.  As written, it's not completely reliable; it depends on the DAG scheduler to schedule the relevant nodes next to each other. Not suggesting that's the best approach, but maybe a useful reference point.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59096





More information about the llvm-commits mailing list