[PATCH] D66216: [ValueTracking] Fix recurrence detection to check both PHI operands.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 09:16:04 PDT 2019


lebedev.ri added a comment.

I know nothing about this code, but the test change appears correct,
and matches what already happens in the second test case.



================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1376
           else
-            break;
+            continue;
           // Ok, we have a PHI of the form L op= R. Check for low
----------------
```
continue; // Check other incoming value
```


================
Comment at: llvm/test/Transforms/InstCombine/phi-known-bits-operand-order.ll:40
   %start = add nsw i32 %cell.0, 1
   br i1 %cond.v, label %for.cond11, label %for.cond26
 
----------------
I think this should/can be unconditional branch to `for.cond11`?
It branches on the same condition that brought us here.
Does the fold still happen then?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66216





More information about the llvm-commits mailing list