Reapply [RISCV] Fold binary op into select if profitable.
This fixes some bugs in the original commit: (1) Operands are passed in correct order when creating new constant and the binary operator. New tests were added to cover these cases. (2) Check was added to see if it is safe to commute the select and the binary operator. Reviewed By: Craig Topper Differential Revision: https://reviews.llvm.org/D152147
Loading
Please sign in to comment