This is an archive of the discontinued LLVM Phabricator instance.

ValueTracking: Handle cannotBeOrderedLessThanZero for fadd
ClosedPublic

Authored by arsenm on Apr 17 2023, 3:36 PM.

Details

Summary

Move cannotBeOrderedLessThanZero logic into computeKnownFPClass.

Diff Detail

Event Timeline

arsenm created this revision.Apr 17 2023, 3:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 3:36 PM
arsenm requested review of this revision.Apr 17 2023, 3:36 PM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: wdng. · View Herald Transcript
foad added inline comments.Apr 18 2023, 2:46 AM
llvm/lib/Analysis/ValueTracking.cpp
4740

||

foad added inline comments.Apr 27 2023, 2:09 AM
llvm/lib/Analysis/ValueTracking.cpp
4705

This will bail out if we only want negzero

arsenm added inline comments.May 17 2023, 3:29 AM
llvm/lib/Analysis/ValueTracking.cpp
4705

This was fixed by D149186, I got confused and thought I pushed this before

foad added inline comments.May 17 2023, 4:51 AM
llvm/lib/Analysis/ValueTracking.cpp
4702

Use OrderedLessThanZeroMask?

4718

Even if !KnownRHS.isKnownNeverNegZero it is still worth calculating KnownLHS, because it might be isKnownNeverNegZero.

4722

Surely need more stuff in InterestedClasses for the recursive call?

4736

Use OrderedLessThanZeroMask?

arsenm updated this revision to Diff 524220.May 22 2023, 3:44 AM
arsenm marked 4 inline comments as done.
foad added inline comments.Jun 6 2023, 5:41 AM
llvm/lib/Analysis/ValueTracking.cpp
4710
4720–4721

Should probably do this before computing KnownRHS?

4752

Should have added PosZero to InterestedSrcs for RHS.

arsenm updated this revision to Diff 531263.Jun 14 2023, 4:55 AM
arsenm marked an inline comment as done.

Address comments

jcranmer-intel accepted this revision.Jun 23 2023, 2:19 PM
This revision is now accepted and ready to land.Jun 23 2023, 2:19 PM