forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstCombine] Fold fcmp into select (llvm#86482)
This patch simplifies `fcmp (select Cond, C1, C2), C3` patterns in ceres: Alive2: https://alive2.llvm.org/ce/z/fWh_sD ``` define i1 @src(double %x) { %cmp1 = fcmp ord double %x, 0.000000e+00 %sel = select i1 %cmp1, double 0xFFFFFFFFFFFFFFFF, double 0.000000e+00 %cmp2 = fcmp oeq double %sel, 0.000000e+00 ret i1 %cmp2 } define i1 @tgt(double %x) { %cmp1 = fcmp uno double %x, 0.000000e+00 ret i1 %cmp1 } ```
- Loading branch information
Showing
3 changed files
with
125 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters