[llvm] r327004 - [InstCombine, NewGVN] remove FP undef from tests
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 12 16:10:03 PDT 2018
Oops...sorry about that. I think just changing to integers won't do what
you want either because 'add i8 %x, undef --> undef'?
So I thought "let me change to some op that won't propagate undef' and
(mistakenly - some day I'll get this right) changed to 'xor'.
And that crashed! Should I file a bug?
; RUN: opt -newgvn %s -S -o - | FileCheck %s
define hidden void @foo() {
top:
%.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 test/Transforms/NewGVN/pr32607.ll -S
Assertion failed: (ProcessedCount[V] < 100 && "Seem to have processed the
same Value a lot"), function updateProcessedCount, file
/Users/spatel/myllvm/llvm/lib/Transforms/Scalar/NewGVN.cpp, line 3000.
On Thu, Apr 12, 2018 at 11:01 AM, Davide Italiano <dccitaliano at gmail.com>
wrote:
> +1
>
> On Thu, Apr 12, 2018 at 9:58 AM, Daniel Berlin <dberlin at dberlin.org>
> wrote:
> > So:
> > I believe the newgvn test failure only occurred because of undef
> (because of
> > special handling of undef in phi's).
> > I think we'd have to move it to integer undef to still test the same
> thing.
> >
> >
> > On Thu, Mar 8, 2018 at 6:57 AM, Sanjay Patel via llvm-commits
> > <llvm-commits at lists.llvm.org> wrote:
> >>
> >> Author: spatel
> >> Date: Thu Mar 8 06:57:08 2018
> >> New Revision: 327004
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=327004&view=rev
> >> Log:
> >> [InstCombine, NewGVN] remove FP undef from tests
> >>
> >> I'm trying to preserve the intent of these tests by using
> >> non-undef operands; if we fix FP undef folding these tests
> >> will not pass.
> >>
> >> Modified:
> >> llvm/trunk/test/Transforms/InstCombine/select-crash.ll
> >> llvm/trunk/test/Transforms/NewGVN/pr32607.ll
> >>
> >> Modified: llvm/trunk/test/Transforms/InstCombine/select-crash.ll
> >> URL:
> >> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/
> Transforms/InstCombine/select-crash.ll?rev=327004&r1=327003&
> r2=327004&view=diff
> >>
> >> ============================================================
> ==================
> >> --- llvm/trunk/test/Transforms/InstCombine/select-crash.ll (original)
> >> +++ llvm/trunk/test/Transforms/InstCombine/select-crash.ll Thu Mar 8
> >> 06:57:08 2018
> >> @@ -15,7 +15,7 @@ entry:
> >> %cmp86 = fcmp ogt double %highlights, 0.000000e+00
> >> %cond90 = select i1 %cmp86, double %sub24, double %add26
> >> %mul91 = fmul double %highlights, %cond90
> >> - %add94 = fadd double undef, %mul91
> >> + %add94 = fadd double %mul91, %mul91
> >> ret double %add94
> >> }
> >>
> >>
> >> Modified: llvm/trunk/test/Transforms/NewGVN/pr32607.ll
> >> URL:
> >> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/
> Transforms/NewGVN/pr32607.ll?rev=327004&r1=327003&r2=327004&view=diff
> >>
> >> ============================================================
> ==================
> >> --- llvm/trunk/test/Transforms/NewGVN/pr32607.ll (original)
> >> +++ llvm/trunk/test/Transforms/NewGVN/pr32607.ll Thu Mar 8 06:57:08
> 2018
> >> @@ -6,7 +6,7 @@ define hidden void @foo() {
> >> ; CHECK-NEXT: br label [[IF:%.*]]
> >> ; CHECK: if:
> >> ; CHECK-NEXT: [[TMP0:%.*]] = phi double [ [[TMP1:%.*]], [[IF]] ], [
> >> undef, [[TOP:%.*]] ]
> >> -; CHECK-NEXT: [[TMP1]] = fadd double [[TMP0]], undef
> >> +; CHECK-NEXT: [[TMP1]] = fadd double [[TMP0]], 1.000000e+00
> >> ; CHECK-NEXT: br i1 false, label [[L50:%.*]], label [[IF]]
> >> ; CHECK: L50:
> >> ; CHECK-NEXT: store i8 undef, i8* null
> >> @@ -22,7 +22,7 @@ top:
> >>
> >> if: ; preds = %if, %top
> >> %0 = phi double [ %1, %if ], [ %.promoted, %top ]
> >> - %1 = fadd double %0, undef
> >> + %1 = fadd double %0, 1.0
> >> br i1 false, label %L50, label %if
> >>
> >> L50: ; preds = %if
> >>
> >>
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at lists.llvm.org
> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180412/a6ebfc10/attachment.html>
More information about the llvm-commits
mailing list