This is an archive of the discontinued LLVM Phabricator instance.

[AsmPrinter] Allow lowerConstant() to strip address space casts
AbandonedPublic

Authored by krisb on Feb 12 2018, 6:15 AM.

Details

Summary

lowerConstant() doesn't expect AddrSpaceCast in an input expression
which can occur if IR is compiled for a SPIR target.

This patch allows lowerConstant() to strip address space casts here if they
haven't been resolved.

Diff Detail

Event Timeline

krisb created this revision.Feb 12 2018, 6:15 AM

I think the lowering of addrspacecast is target dependent.

krisb added a comment.Feb 27 2018, 8:29 AM

I think the lowering of addrspacecast is target dependent.

Yes, I'm absolutely agree.
But this is about to change the behavior from 'fail by default' to 'skip by default'.
Does it make sense?

arsenm requested changes to this revision.Feb 27 2018, 9:25 AM

This is too aggressive. I have D20758 to do this for noon. Otherwise it should fail for the target to do something about it

This revision now requires changes to proceed.Feb 27 2018, 9:25 AM

This is too aggressive. I have D20758 to do this for noon. Otherwise it should fail for the target to do something about it

Thanks. Are you going to commit D20758 patch?

krisb abandoned this revision.Apr 11 2019, 1:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2019, 1:22 AM