Ping 2: [PATCH] DAGCombiner: Recognise rotates by X+C
Kay Tiong Khoo
kkhoo at perfwizard.com
Thu Dec 19 10:24:15 PST 2013
Hi Richard,
Could this patch be enhanced to recognize this case too:
http://llvm.org/bugs/show_bug.cgi?id=17332#c12
Maybe it already does? Sorry, I can't test it myself at the moment.
On Thu, Dec 19, 2013 at 10:28 AM, Richard Sandiford <
rsandifo at linux.vnet.ibm.com> wrote:
> Second ping for this patch.
>
> Richard Sandiford <rsandifo at linux.vnet.ibm.com> writes:
> > The SystemZ tests check for rotates by X+10 using:
> >
> > %add = add i32 %amt, 10
> > %sub = sub i32 32, %add
> > %parta = shl i32 %a, %add
> > %partb = lshr i32 %a, %sub
> > %or = or i32 %parta, %partb
> >
> > But instcombine turns this into:
> >
> > %add = add i32 %amt, 10
> > %sub = sub i32 22, %amt
> > %parta = shl i32 %a, %add
> > %partb = lshr i32 %a, %sub
> > %or = or i32 %parta, %partb
> >
> > so that the subtraction isn't dependent on the addition. This patch
> extends DAGCombiner to handle this pattern too.
> >
> >
> > http://llvm-reviews.chandlerc.com/D2347
> >
> > Files:
> > lib/CodeGen/SelectionDAG/DAGCombiner.cpp
> > test/CodeGen/SystemZ/shift-04.ll
>
> Thanks,
> Richard
>
>
> _______________________________________________
> 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/20131219/e48cbfc2/attachment.html>
More information about the llvm-commits
mailing list