[flang-commits] [compiler-rt] [llvm] [flang] [clang] [clang-tools-extra] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)
Florian Hahn via flang-commits
flang-commits at lists.llvm.org
Tue Jan 16 14:05:26 PST 2024
================
@@ -8292,13 +8271,13 @@ VPRecipeOrVPValueTy VPRecipeBuilder::tryToBlend(PHINode *Phi,
for (unsigned In = 0; In < NumIncoming; In++) {
VPValue *EdgeMask =
createEdgeMask(Phi->getIncomingBlock(In), Phi->getParent(), *Plan);
- assert((EdgeMask || NumIncoming == 1) &&
+ assert((EdgeMask || NumIncoming == 1 || Operands[In] == Operands[0]) &&
----------------
fhahn wrote:
There can be degenerate cases like
```
loop.1.header:
%iv.1 = phi i32 [ 0, %entry ], [ %iv.1.next, %loop.1.latch ]
%l = load i32, ptr %A
br i1 %c, label %loop.1.latch, label %loop.1.latch
loop.1.latch:
%p = phi i32 [ %l, %loop.1.header ], [ %l, %loop.1.header ]
%iv.1.next = add nuw nsw i32 %iv.1, 1
%ec.1 = icmp eq i32 %iv.1.next, 100
br i1 %ec.1, label %exit.1, label %loop.1.header
```
https://github.com/llvm/llvm-project/pull/76090
More information about the flang-commits
mailing list