[PATCH] D128582: Move SeparateConstOffsetFromGEPPass() before LSR() and enable EnableGEPOpt by default.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 09:38:04 PDT 2022


dmgreen added a comment.

In D128582#3668948 <https://reviews.llvm.org/D128582#3668948>, @gsocshubham wrote:

> There is only one LIT test which is failing now - `CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll`.

It looks like it is removing a unused alloca. Try this:

  index ef559652380e..3fb33ecbb2c7 100644
  --- a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
  +++ b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
  @@ -1458,10 +1458,12 @@ define void @test_lifetime_intrin() {
   ; O3-LABEL: name: test_lifetime_intrin
   ; O3: {{%[0-9]+}}:_(p0) = G_FRAME_INDEX %stack.0.slot
   ; O3-NEXT: LIFETIME_START %stack.0.slot
  +; O3-NEXT: G_STORE
   ; O3-NEXT: LIFETIME_END %stack.0.slot
   ; O3-NEXT: RET_ReallyLR
     %slot = alloca i8, i32 4
     call void @llvm.lifetime.start.p0i8(i64 0, i8* %slot)
  +  store volatile i8 10, i8* %slot
     call void @llvm.lifetime.end.p0i8(i64 0, i8* %slot)
     ret void
   }



================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator-gep.ll:54
   %v2 = load i32, i32* %gep2
   %res = add i32 %v2, %v2
   ret i32 %res
----------------
Make this %v1, %v2, I think is better. One of the loads is otherwise unused.


================
Comment at: llvm/test/Transforms/SeparateConstOffsetFromGEP/split-gep.ll:1
+; RUN: llc < %s -O3 -mtriple=aarch64-linux-gnu | FileCheck %s
+
----------------
Oh - If this test is using the AArch64 target then it needs to be moved into an AArch64 subdirectory, which is only ran when AArch64 is a registered target. If it doesn't exist already, make sure there is a lit.local.cfg.


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

https://reviews.llvm.org/D128582



More information about the llvm-commits mailing list