This is an archive of the discontinued LLVM Phabricator instance.

InstCombine: Directly use computeKnownFPClass in is.fpclass combines
ClosedPublic

Authored by arsenm on Apr 11 2023, 7:21 PM.

Details

Summary

The various isKnownNever* calls can be merged into one.

Diff Detail

Event Timeline

arsenm created this revision.Apr 11 2023, 7:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2023, 7:21 PM
arsenm requested review of this revision.Apr 11 2023, 7:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2023, 7:21 PM
Herald added a subscriber: wdng. · View Herald Transcript
foad added a comment.Apr 12 2023, 3:52 AM

The various isKnownNever* calls can be merged into one.

That makes it sounds like an NFC change, but it is clearly improving some tests.

llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
934

"must be false"?

946

Given the other case we've handled already, I think this one can simplify to if (Mask == Known.KnownFPClasses).

The various isKnownNever* calls can be merged into one.

That makes it sounds like an NFC change, but it is clearly improving some tests.

From the passing of the assumption cache. Could split the parts

arsenm updated this revision to Diff 513758.Apr 14 2023, 3:02 PM
arsenm marked 2 inline comments as done.
foad accepted this revision.Apr 17 2023, 2:42 AM

The various isKnownNever* calls can be merged into one.

That makes it sounds like an NFC change, but it is clearly improving some tests.

From the passing of the assumption cache. Could split the parts

I think it's fine to commit as-is if you mention this in the commit message.

This revision is now accepted and ready to land.Apr 17 2023, 2:42 AM