Ping: [PATCH] DAGCombiner: Recognise rotates by X+C
Richard Sandiford
rsandifo at linux.vnet.ibm.com
Fri Dec 13 03:13:58 PST 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2347.1.patch
Type: text/x-patch
Size: 5041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131213/b2878dbb/attachment.bin>
More information about the llvm-commits
mailing list