llvm / llvm/llvm-project

Backend: Remove redundant `fcanonicalize`

Open
#170,406 0 comments 0 reactions 1 assignee Claimed by @wzssyqa View on GitHub
floating-point llvm:codegen
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Code like

```
define float @minimumnum_fp32(float %a, float %b, float %c, float %d) {
%minab = call float @llvm.minimumnum.f32(float %a, float %b)
%mincd = call float @llvm.minimumnum.f32(float %c, float %d)
%min = call float @llvm.minimumnum.f32(float %minab, float %mincd)
ret float %min
}
```

On platforms has `fmaxnum_ieee`, the `fcanonicalize` is not needed for the 3rd `llvm.minimumnum.f32`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.