[llvm] [Attributor]: Fix Potential bug when handling PHI in AAPointerInfo (PR #97321)

Vidush Singhal via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 10:50:45 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;
----------------
vidsinghal wrote:

Loopinfo could be use instead: https://stackoverflow.com/questions/50138271/detect-if-basicblock-is-in-a-loop ?

https://github.com/llvm/llvm-project/pull/97321


More information about the llvm-commits mailing list