I originally needed this change for our fork of clang targeting CHERI which
uses address space 200 extensively. It turns out the only test that fails
after this change is Transforms/ConstProp/loads.ll which already contains
a FIXME for this case.
Details
Details
- Reviewers
lattner mehdi_amini arsenm
Diff Detail
Diff Detail
- Build Status
Buildable 13019 Build 13019: arc lint + arc unit
Event Timeline
Comment Actions
I'm not sure this is correct because the addrspacecast could include an add of an additional constant offset or some other factor
Comment Actions
True, I didn't think of that. For us this will almost always work without adding an additional offset but I am not sure what the correct way to fix this is.
Would it make sense to add a function like canPerformConstantAddrSpaceCast(unsigned FromAS, unsigned ToAS) to DataLayout?
Comment Actions
I think there correct solution is to allow bitcasts between equivalently sized pointers for no-op casts