[PATCH] D124967: [SROA] Avoid postponing rewriting load/store by ignoring lifetime intrinsics in partition's promotability checking
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 6 01:40:39 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:1990
+ // partition.
+ if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(S.getUse()->getUser())) {
+ Intrinsic::ID IntriID = II->getIntrinsicID();
----------------
You can use isLifetimeStartOrEnd() here.
================
Comment at: llvm/test/Transforms/SROA/lifetime-intrinsic.ll:1
+; RUN: opt < %s -passes=sroa -S | FileCheck %s
+
----------------
Please use update_test_checks.py to generate test checks.
================
Comment at: llvm/test/Transforms/SROA/lifetime-intrinsic.ll:21
+; CHECK: [[ARR_SROA_0_0:%.*]] = phi i32 [ 0, %entry ], [ %res0, %while_body ]
+while_cond:
+ %loopi = load i32, i32* %loop, align 4
----------------
Is the loop required to demonstrate the problem?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124967/new/
https://reviews.llvm.org/D124967
More information about the llvm-commits
mailing list