This is an archive of the discontinued LLVM Phabricator instance.

Attributor: Assume handling for nofpclass
ClosedPublic

Authored by arsenm on Mar 3 2023, 3:48 PM.

Diff Detail

Event Timeline

arsenm created this revision.Mar 3 2023, 3:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2023, 3:48 PM
arsenm requested review of this revision.Mar 3 2023, 3:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2023, 3:48 PM
Herald added a subscriber: wdng. · View Herald Transcript
sameerds added inline comments.Mar 5 2023, 10:46 PM
llvm/include/llvm/Analysis/ValueTracking.h
230

Would "LookThroughAbsForLHS" be a more specific name for this argument?

arsenm added inline comments.Mar 6 2023, 4:49 AM
llvm/include/llvm/Analysis/ValueTracking.h
230

The point is to exactly report the same incoming value, and fabs is more specific about what it's doing. This could perform other tricks by looking at fneg and fcopysign in the future

sameerds accepted this revision.Mar 8 2023, 3:30 AM

I am not familiar enough to assess whether this covers everything. But as far as I can see, the implementation does what is promised. Might want to wait for comments from other reviewers.

This revision is now accepted and ready to land.Mar 8 2023, 3:30 AM
jdoerfert accepted this revision.Mar 16 2023, 12:29 PM

LG, two nits.

llvm/lib/Analysis/ValueTracking.cpp
4285

Copy-paste.

llvm/lib/Transforms/IPO/AttributorAttributes.cpp
10309

We don't need two places to followUses

arsenm marked an inline comment as done.Mar 17 2023, 4:35 AM
arsenm added inline comments.
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
10309

This one got dropped since it didn't do anything in the previous patch. Which one would be better?