Bug ID: 37121
           Summary: [NewGVN] crash/assert - Seem to have processed the
                    same Value a lot
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations

This is a small modification (swap 'fadd' with 'xor') of the existing test for
bug 32607 (regression test at test/Transforms/NewGVN/pr32607.ll - which I
wrongly modified trying to preserve the behavior, but avoiding FP undef). 

It's the same assert message as the earlier bug, so maybe it's slipping through
a crack in the fix for that bug?

define hidden void @foo() {
  %.promoted = load i8, i8* undef, align 8
  br label %if

;; This is really a multi-valued phi, because the phi is defined by an
expression of the phi.
;; This means that we can't propagate the value over the backedge, because
we'll just cycle
;; through every value.

if:                                               ; preds = %if, %top
  %0 = phi i8 [ %1, %if ], [ %.promoted, %top ]
  %1 = xor i8 %0, undef
  br i1 false, label %L50, label %if

L50:                                              ; preds = %if
  %.lcssa = phi i8 [ %1, %if ]
  store i8 %.lcssa, i8* undef, align 8
  ret void


$ ./opt -newgvn xor-with-undef.ll -S
Assertion failed: (ProcessedCount[V] < 100 && "Seem to have processed the same
Value a lot"), function updateProcessedCount, file
llvm/lib/Transforms/Scalar/NewGVN.cpp, line 3000.

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to