This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Widen G_IMPLICIT_DEF and G_FREEZE before clamping
ClosedPublic

Authored by paquette on Aug 5 2021, 2:53 PM.

Details

Summary

Similar to other cleanup commits which widen instructions before clamping during legalization. Purpose of this is to avoid weird type breakdowns.

In terms of G_IMPLICIT_DEF, this simplifies legalization for other instructions. The legalizer has to emit G_IMPLICIT_DEF to legalize certain instructions, so this can help with emitting merges elsewhere.

Diff Detail

Event Timeline

paquette created this revision.Aug 5 2021, 2:53 PM
paquette requested review of this revision.Aug 5 2021, 2:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2021, 2:53 PM
jroelofs accepted this revision.Aug 5 2021, 3:17 PM

LGTM

llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
83

This widen-then-clamp pattern seems really common. Maybe that ought to be a first-class operation?

This revision is now accepted and ready to land.Aug 5 2021, 3:17 PM
paquette added inline comments.Aug 5 2021, 6:17 PM
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
83

Yeah, I think so too. I just wanted to audit everything first.

This revision was landed with ongoing or failed builds.Aug 5 2021, 6:25 PM
This revision was automatically updated to reflect the committed changes.