[llvm] [Analysis] Attribute Range should not prevent tail call optimization (PR #91122)
Jinsong Ji via llvm-commits
llvm-commits at lists.llvm.org
Mon May 6 20:41:58 PDT 2024
jsji wrote:
> > > shall there not be a update of some test for the TargetLowering.cpp update now that it is added to this PR
> >
> >
> > Remove the changes from this PR first for now. Will follow up with another PR once I get the test for it ready.
>
> I'd rather not have these two pieces of code go out of sync.
I am not able to come up with a reasonable testcase for now.
1. Most of the tests that hit this logic are floating point libcalls.
2. For some libcall returning int, adding range attr won't cause problem
```
declare range(i64 0, 2) i64 @llvm.llround.f32(float) nounwind readnone
define i64 @testmsxs(float %x) {
entry:
%0 = musttail call i64 @llvm.llround.f32(float %x)
ret i64 %0
}
```
Let me know if you can find some testcase that shows problems .
https://github.com/llvm/llvm-project/pull/91122
More information about the llvm-commits
mailing list