[PATCH] D14670: Fix bug 25440: GVN assertion after coercing loads

Weiming Zhao via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 17:30:19 PST 2015


weimingz added a comment.

This patch adds a reduced test from SPASS.

we need the check:

  if (Num >= NextNum)
          addToLeaderTable(Num, I, I->getParent());

Otherwise, BB %wile.end (see line 91) will become :

while.end:                                        ; preds = %while.cond.16

  %add.ptr = getelementptr inbounds i8, i8* %v2, i32 undef
  store i8* %add.ptr, i8** @dfg_text, align 4
  %sub.ptr.sub26 = sub i32 0, %0  ==> use here
  %0 = ptrtoint i8* %add.ptr to i32  ==> def here
  switch i32 undef, label %sw.default [
    i32 65, label %while.bodythread-pre-split


http://reviews.llvm.org/D14670





More information about the llvm-commits mailing list