HomePhabricator

Recommit [SROA] Enhance SROA to handle `addrspacecast`ed allocas

Description

Recommit [SROA] Enhance SROA to handle addrspacecasted allocas

[SROA] Enhance SROA to handle addrspacecasted allocas

  • Fix typo in original change
  • Add additional handling to ensure all return pointers are properly casted.

Summary:

  • After addrspacecast is allowed to be eliminated in SROA, the adjusting of storage pointer (from `alloca) needs to handle the potential different address spaces between the storage pointer (from alloca) and the pointer being used.

Reviewers: arsenm

Subscribers: wdng, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63501