This is an archive of the discontinued LLVM Phabricator instance.

InstSimplify: Add basic folding of llvm.is.fpclass intrinsic
ClosedPublic

Authored by arsenm on Dec 10 2022, 7:50 AM.

Details

Summary

Copied from the existing llvm.amdgcn.class handling; eventually I will
fold that to the generic intrinsic when legal. The tests should
probably move into an instsimplify only test.

Diff Detail

Event Timeline

arsenm created this revision.Dec 10 2022, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2022, 7:50 AM
arsenm requested review of this revision.Dec 10 2022, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2022, 7:50 AM
Herald added a subscriber: wdng. · View Herald Transcript

Are there any plans for a Mask2Enum function such that your code could become a switch statement?

Are there any plans for a Mask2Enum function such that your code could become a switch statement?

I don't see how that would help here. Each bit test needs to be performed in sequence, it's not a simple enum mapping

jyknight accepted this revision.Dec 10 2022, 6:03 PM
This revision is now accepted and ready to land.Dec 10 2022, 6:03 PM