This is an archive of the discontinued LLVM Phabricator instance.

[GISel]; Add a helper legalization rule for legalizing addressspacecast if no-op
AcceptedPublic

Authored by aditya_nandakumar on Jun 25 2018, 3:37 PM.

Details

Summary

Added .legalIfNoopAddrSpaceCast predicate to handle the common case of a no-op addrspacecast in most targets.

Diff Detail

Repository
rL LLVM

Event Timeline

aemerson accepted this revision.Sep 20 2018, 5:52 AM

This seems like something that most targets would want done by default. I wonder if we should have a standard set of legalizer actions that targets can use. LGTM anyway.

lib/CodeGen/GlobalISel/LegalityPredicates.cpp
104

This should assert already in getAddressSpace().

This revision is now accepted and ready to land.Sep 20 2018, 5:52 AM