[all-commits] [llvm/llvm-project] c158dd: Reapply [RISCV] Fold binary op into select if prof...
mgudim via All-commits
all-commits at lists.llvm.org
Fri Jul 14 12:31:44 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c158ddd99eaf3f0ce712ef6e629fdd8e7e272919
https://github.com/llvm/llvm-project/commit/c158ddd99eaf3f0ce712ef6e629fdd8e7e272919
Author: Mikhail Gudim <mgudim at gmail.com>
Date: 2023-07-14 (Fri, 14 Jul 2023)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
A llvm/test/CodeGen/RISCV/fold-binop-into-select.ll
Log Message:
-----------
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
More information about the All-commits
mailing list