llvm / llvm/llvm-project

[InstCombine] failed to fold hypot(x, y) -> sqrt(x^2 + y^2) under afn if range is known

Closed
#204,305 2 comments 0 reactions 0 assignees View on GitHub
llvm:instcombine missed-optimization
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

https://godbolt.org/z/4hTj5radz

ref: https://github.com/llvm/llvm-project/pull/204292

Contributor guide

Open the contributing guide

Research direction

Reproduce the failed fold using the Godbolt example at https://godbolt.org/z/4hTj5radz, then read the referenced pull request at https://github.com/llvm/llvm-project/pull/204292. Determine how InstCombine handles hypot under afn when the input range is known; done means the reported case folds as intended.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.