This is an archive of the discontinued LLVM Phabricator instance.

ValueTracking: Handle insertelement in computeKnownFPClass
ClosedPublic

Authored by arsenm on Apr 12 2023, 6:32 PM.

Diff Detail

Event Timeline

arsenm created this revision.Apr 12 2023, 6:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2023, 6:32 PM
arsenm requested review of this revision.Apr 12 2023, 6:32 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
arsenm added inline comments.Apr 12 2023, 6:40 PM
llvm/lib/Analysis/ValueTracking.cpp
4549

I think these resets aren't necessary (and probably aren't in the computeKnownBits version either)

arsenm planned changes to this revision.Apr 12 2023, 7:29 PM
arsenm updated this revision to Diff 513186.Apr 13 2023, 5:27 AM

Assume uninitialized Knowns are passed in

llvm/lib/Analysis/ValueTracking.cpp
4538

This assert should be moved out of the switch statement, I think.

arsenm updated this revision to Diff 514237.Apr 17 2023, 7:51 AM

Move assert

foad added a comment.Apr 17 2023, 9:10 AM

Looks OK modulo nits.

llvm/lib/Analysis/ValueTracking.cpp
4113

Wouldn't it be simpler to make all these computeKnownFPClass functions return KnownFPClass?

4606–4607

Could call your new computeKnownFPClass overload rather than repeating this logic?

arsenm marked an inline comment as done.Apr 17 2023, 10:07 AM
arsenm added inline comments.
llvm/lib/Analysis/ValueTracking.cpp
4113

Yes. I started by copying the raw signature for computeKnownBits. Probably should do a cleanup and replace the arguments at some point. The ordering doesn't make much sense (e.g. Depth before the others seems like a shortcut taken years ago). Plus TLI not being part of Query also doesn't make much sense

4606–4607

Yes, I think so

arsenm updated this revision to Diff 514786.Apr 18 2023, 4:45 PM
foad accepted this revision.Apr 19 2023, 12:55 AM
This revision is now accepted and ready to land.Apr 19 2023, 12:55 AM