[llvm] ValueTracking: Identify implied fp classes by general fcmp (PR #66505)

Adrian Kuegel via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 05:52:00 PST 2023


akuegel wrote:

> > > @akuegel remember this test failure in TF last week? maybe you have additional information here?
> > 
> > 
> > I have debugged now which class is detected, and it is `FPClassTest::fcPosInf`. Does that help?
> 
> Not really, I want a test case which reproduces the failure. I don't want to spend unbounded time guessing on what fell out of this test case that managed hit this
> 
> > ```
> > if (RHSClass == fcPosZero || RHSClass == fcNegZero)
> >     return {nullptr, fcAllFlags, fcAllFlags};
> > ```
> > 
> > 
> >     
> >       
> >     
> > 
> >       
> >     
> > 
> >     
> >   
> > Any reason why fcPosInf, fcNegInf, etc. is not just treated in the same way? It seems the original assert was written with some assumption that doesn't hold. I also verified that changing it to:
> 
> Infinities are simpler than 0 as they do not depend on the denormal mode. This will be a trivial fix if I can just get a reproducer

Unfortunately my knowledge about the LLVM side is quite limited. I don't know how to create a reproducer for this, I tried my best to at least debug with what FPClassTest value we are hitting the assert.

https://github.com/llvm/llvm-project/pull/66505


More information about the llvm-commits mailing list