This is an archive of the discontinued LLVM Phabricator instance.

[X86] Remove different address space check in isNoopAddrSpaceCast
AbandonedPublic

Authored by wenju on Apr 8 2022, 1:18 AM.

Details

Reviewers
arsenm
Summary

SrcAS and DestAS could be the same.

Diff Detail

Event Timeline

wenju created this revision.Apr 8 2022, 1:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2022, 1:18 AM
wenju requested review of this revision.Apr 8 2022, 1:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2022, 1:18 AM
arsenm added a comment.Apr 8 2022, 5:58 AM

What context is this from? addrspacecast is required to change the address space

wenju added a comment.Apr 10 2022, 5:03 PM

isNoopPtrIntCastPair in lib/Transforms/Scalar/InferAddressSpaces.cpp calls isNoopAddrSpaceCast, but the two arguments might be the same. I notice isNoopAddrSpaceCast in other targets don't have such assert, so I remove this assert in X86 target.
Do you think we should check address spaces are not the same prior to isNoopAddrSpaceCast callsite in isNoopPtrIntCastPair?

isNoopPtrIntCastPair in lib/Transforms/Scalar/InferAddressSpaces.cpp calls isNoopAddrSpaceCast, but the two arguments might be the same. I notice isNoopAddrSpaceCast in other targets don't have such assert, so I remove this assert in X86 target.
Do you think we should check address spaces are not the same prior to isNoopAddrSpaceCast callsite in isNoopPtrIntCastPair?

So you're claiming InferAddressSpaces asserts for x86? Can you add a test?

So you're claiming InferAddressSpaces asserts for x86? Can you add a test?

Test is added in https://reviews.llvm.org/D123573, please review.
Abandon this revision.

wenju abandoned this revision.Apr 12 2022, 12:22 AM