[PATCH] overzealous instcombine of fptrunc(OP(fpext(x), fpext(y)))

Sean Silva silvas at purdue.edu
Sat Nov 30 20:08:20 PST 2013


On Thu, Nov 28, 2013 at 1:20 AM, Nadav Rotem <nrotem at apple.com> wrote:

> Hi Steve!
>
> You are the expert in this domain so I trust you that the code is correct
> :)
>
> Can you please add a CHECK: line for the function name and for ‘ret’ in
> your tests? It helps in debugging failing tests.  Also,
> InstCombine/fpextend.ll probably needs a CHECK line.
>

CHECK-LABEL for the function name also gives extra goodness.

-- Sean Silva


>
> The rest LGTM.
>
> Thanks,
> Nadav
>
>
> On Nov 27, 2013, at 10:48 AM, Stephen Canon <scanon at apple.com> wrote:
>
> > InstCombiner::visitFPTrunc is currently overzealous and does some
> "optimizations" that it shouldn't (because they change results).  The
> attached patch reins it in so that we still get the benefit of this
> optimization for common cases, but we get rid of the misbehavior, and adds
> some test cases for situations where the optimization *shouldn't* happen.
> >
> > Thanks to Pascal Quoc for bringing the issue to my attention (
> http://blog.frama-c.com/index.php?post/2013/09/25/The-problem-with-differential-testing-is-that-at-least-one-of-the-compilers-must-get-it-right
> ).
> >
> > This is also <rdar://problem/15080092>.
> >
> > Thanks,
> > – Steve
> >
> > <fpextend_patch.txt>_______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131130/c1667f6b/attachment.html>


More information about the llvm-commits mailing list