This is an archive of the discontinued LLVM Phabricator instance.

InstCombine: Fix metadata arguments blocking freeze combining
ClosedPublic

Authored by arsenm on Dec 5 2022, 5:41 AM.

Details

Summary

These are used for special arguments to intrinsics and don't make any
sense to consider for poisonness. Fixes not pushing freeze through
llvm.fptrunc.round.

92106641ae297c24877085e0357e8095aa7b43c9 made
isGuaranteedNotToBeUndefOrPoison return false for metadata arguments,
which doesn't entirely make sense. An alternate patch could switch
that to true, and try to filter out adding some pointless noundefs on
metadata arguments (I tried that, attributor breaks one case with a
llvm.dbg.value in it).

Diff Detail

Event Timeline

arsenm created this revision.Dec 5 2022, 5:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 5 2022, 5:41 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
arsenm requested review of this revision.Dec 5 2022, 5:41 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: wdng. · View Herald Transcript
nikic accepted this revision.Dec 5 2022, 6:01 AM
nikic added a subscriber: nikic.

LG

This revision is now accepted and ready to land.Dec 5 2022, 6:01 AM