| Issue |
174308
|
| Summary |
[InstCombine] Simplify select pattern of 'sitofp/uitofp + redundant fcmp/select' using ConstantFPRange
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
wenju-he
|
PR https://github.com/llvm/llvm-project/pull/173452 removes redundant fcmp and select, but the approach can be improved:
```
> Or alternatively, if we have to match the full pattern anyway, wouldn't it make more sense to make this an explicit pattern in visitSelect (or even simplifySelectInst)?
I'd prefer this approach after the ConstantFPRange support for uitofp/sitofp is ready. Then we can handle other variants in https://github.com/dtcxzyw/llvm-opt-benchmark/pull/3210/files as well. But for now, relaxing the bailout is the cheapest way to achieve the goal (at least I don't need to care about FMF propagations/+-0/...).
```
_Originally posted by @dtcxzyw in https://github.com/llvm/llvm-project/issues/173452#issuecomment-3691523537_
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs