[llvm] [Attributor]: Fix Potential bug when handling PHI in AAPointerInfo (PR #97321)
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 14:37:47 PDT 2024
================
@@ -214,7 +214,7 @@ ChangeStatus clampStateAndIndicateChange<DerefState>(DerefState &S,
static bool mayBeInCycle(const CycleInfo *CI, const Instruction *I,
bool HeaderOnly, Cycle **CPtr = nullptr) {
if (!CI)
- return true;
+ return false;
----------------
jdoerfert wrote:
We can't assume we are not in a cycle if we don't know. That leads to wrong results. We can, however, try to make sure we have cycle info for the case or use something else.
https://github.com/llvm/llvm-project/pull/97321
More information about the llvm-commits
mailing list