[PATCH] D70975: [SDAG] remove use restriction in isNegatibleForFree() when called from getNegatedExpression()
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 14:00:55 PST 2019
spatel reopened this revision.
spatel added a comment.
This revision is now accepted and ready to land.
In D70975#1780450 <https://reviews.llvm.org/D70975#1780450>, @fhahn wrote:
> In D70975#1780401 <https://reviews.llvm.org/D70975#1780401>, @fhahn wrote:
>
> > In D70975#1780280 <https://reviews.llvm.org/D70975#1780280>, @spatel wrote:
> >
> > > In D70975#1780237 <https://reviews.llvm.org/D70975#1780237>, @fhahn wrote:
> > >
> > > > This seems to cause a DAGCombiner to not terminate for some inputs on AArch64. Unfortunately I cannot share the inputs that cause the cycle :(
> > >
> > >
> > > Thanks for letting us know. Can you check if D70595 <https://reviews.llvm.org/D70595> would cause the same cycle?
> > > Will it be possible to reduce a test that can be shared? I'm not sure how to proceed without a test.
> >
> >
> > I'll see if I can reduce it tomorrow! I looked at the debug output and it seems the cycle is quite simple.
>
>
> With this patch, running `llc` on the snippet below causes a combiner cycle.
>
> define linkonce_odr i64 @quux(double* %arg, double %arg1, double %arg2, double %arg3, double %arg4, double %arg5) {
> bb:
> %tmp = fdiv double 1.000000e+00, %arg1
> %tmp6 = fmul double %tmp, %arg2
> %tmp7 = fmul double %tmp, %arg3
> %tmp8 = fmul double %tmp, %arg4
> %tmp9 = fmul double %tmp, %arg5
> %tmp10 = fneg double %tmp7
> %tmp11 = fmul double %tmp6, %tmp8
> %tmp12 = fmul double %tmp9, 4.000000e+00
> %tmp13 = fsub double %tmp11, %tmp12
> %tmp14 = fneg double %tmp9
> %tmp15 = fmul double %tmp6, %tmp14
> %tmp16 = fmul double %tmp6, %tmp15
> %tmp17 = fmul double %tmp7, %tmp12
> %tmp18 = fadd double %tmp16, %tmp17
> %tmp19 = fmul double %tmp8, %tmp8
> %tmp20 = fsub double %tmp18, %tmp19
> %tmp21 = call i64 @wombat(double* nonnull undef, double 1.000000e+00, double %tmp10, double %tmp13, double %tmp20)
> ret i64 %tmp21
> }
> declare i64 @wombat(double*, double, double, double, double)
>
Thanks! Reverted this to investigate further.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70975/new/
https://reviews.llvm.org/D70975
More information about the llvm-commits
mailing list