Failure to reach fixpoint in 1st iteration when constant folding libcall
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
https://llvm.godbolt.org/z/456M4eq6f
We constant fold the call to `floor`, but it's not trivially dead so it hangs around after being RAUWd. Maybe we should mark the `TargetLibraryInfo::hasOptimizedCodeGen` functions as trivially dead?
Contributor guide
Research direction
Start by reproducing the failure with the Compiler Explorer example at https://llvm.godbolt.org/z/456M4eq6f and observe why the first constant-folding iteration fails to reach a fixpoint. Read the handling of floor and TargetLibraryInfo::hasOptimizedCodeGen, including how the RAUW'd call is classified for dead-code elimination. Done means the example reaches a fixpoint without hanging and the behavior is covered by an appropriate regression test.
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
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100