[llvm-bugs] [Bug 31613] NewGVN asserts, "instruction processed too many times"

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 12 16:22:43 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=31613

Alina Sbirlea <alina.sbirlea at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
                 CC|                            |alina.sbirlea at gmail.com
             Status|RESOLVED                    |REOPENED

--- Comment #4 from Alina Sbirlea <alina.sbirlea at gmail.com> ---
Reopening, as I'm hitting this assertion again in a different testcase.

To reproduce:
opt -passes=mldst-motion,newgvn test.ll


target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-grtev4-linux-gnu"

define hidden void @barrier() align 2 {
entry:
  %0 = load i64, i64* null, align 8
  %call9 = tail call i64 @g()
  %rem = select i1 undef, i64 0, i64 %call9
  %add = add i64 %0, 1
  %shr17 = lshr i64 %add, 1
  %sub = add nsw i64 %shr17, -1
  br label %for.cond

for.cond.loopexit.loopexit:                       ; preds = %cleanup.cont
  br label %for.cond.loopexit

for.cond.loopexit:                                ; preds = %for.cond,
%for.cond.loopexit.loopexit
  br label %for.cond

for.cond:                                         ; preds = %for.cond.loopexit,
%entry
  %__current.0 = phi i64 [ %rem, %entry ], [ 0, %for.cond.loopexit ]
  %cmp222 = icmp eq i64 %__current.0, %sub
  br i1 %cmp222, label %land.lhs.true.preheader, label %for.cond.loopexit

land.lhs.true.preheader:                          ; preds = %for.cond
  br label %land.lhs.true

land.lhs.true:                                    ; preds = %cleanup.cont,
%land.lhs.true.preheader
  %__current.13 = phi i64 [ %inc, %cleanup.cont ], [ %__current.0,
%land.lhs.true.preheader ]
  br label %cleanup.cont

cleanup.cont:                                     ; preds = %land.lhs.true
  %inc = add i64 %__current.13, 1
  %cmp22 = icmp eq i64 %inc, %sub
  br i1 %cmp22, label %land.lhs.true, label %for.cond.loopexit.loopexit
}

declare hidden i64 @g() local_unnamed_addr align 2

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210512/9619a836/attachment.html>


More information about the llvm-bugs mailing list