Page MenuHomePhabricator

[SelectionDAG] Modify legalizing intrinsic

Authored by SjoerdMeijer on Aug 20 2020, 9:22 AM.



Adapt legalization of to the new semantics as proposed in D86147.
Because the second argument is now tripcount, we legalize it to an icmp ULT instead of an ULE when it was the backedge-taken count.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Aug 20 2020, 9:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2020, 9:22 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
SjoerdMeijer requested review of this revision.Aug 20 2020, 9:22 AM
arsenm added a subscriber: arsenm.Aug 20 2020, 9:56 AM
arsenm added inline comments.

Why is this expanded here in the first place?

SjoerdMeijer added inline comments.Aug 20 2020, 10:56 AM

The intrinsic is used to communicate information from middle-end to back-end. The back-end transformation could reject it for different reasons. If the transformation is not triggering, the intrinsic has to be expanded to its original semantics somewhere. This place seems to be a good fit and is generic, so if there will be more use-cases than only the ARM back-end than that's covered.

dmgreen accepted this revision.Aug 25 2020, 2:07 AM

Seems OK, to go along with the update to the semantics.

This revision is now accepted and ready to land.Aug 25 2020, 2:07 AM