[PATCH] D31924: SROA: Allow eliminating addrspacecasted allocas

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 01:45:10 PDT 2019


arichardson added a comment.

In D31924#1537558 <https://reviews.llvm.org/D31924#1537558>, @theraven wrote:

> I think this looks like it will improve codegen for us and not violate any of our C-level guarantees.  Hopefully @arichardson can also take a look.


I just tried this on our fork and it looks good.



================
Comment at: test/Transforms/SROA/basictest.ll:108
+; CHECK: %A.sroa.0.2.gepB.sroa_idx = getelementptr inbounds [10 x i8], [10 x i8]* %A.sroa.0, i16 0, i16 2
+; CHECK-NEXT: %A.sroa.0.2.gepB.sroa_cast = addrspacecast i8* %A.sroa.0.2.gepB.sroa_idx to i64 addrspace(1)*
+; CHECK-NEXT: store i64 %X, i64 addrspace(1)* %A.sroa.0.2.gepB.sroa_cast, align 1
----------------
Use FileCheck captures for the variables in case the naming changes in the future?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D31924/new/

https://reviews.llvm.org/D31924





More information about the llvm-commits mailing list