]> granicus.if.org Git - llvm/commit
[DAGCombiner] Bug 31275- Extract a shift from a constant mul or udiv if a rotate...
authorDavid Bolvansky <david.bolvansky@gmail.com>
Mon, 30 Jul 2018 16:50:00 +0000 (16:50 +0000)
committerDavid Bolvansky <david.bolvansky@gmail.com>
Mon, 30 Jul 2018 16:50:00 +0000 (16:50 +0000)
commit44dc58d645c32f4f55c3c48f0066311469e74eb6
treec44946370ac3a8f08fa047e2177423f6ab14e3a2
parent005ad0240a6bca58b55f5500c62d3b15ed81364a
[DAGCombiner] Bug 31275- Extract a shift from a constant mul or udiv if a rotate can be formed

Summary:
Attempt to extract a shrl from a udiv or a shl from a mul if this allows a rotate to be formed.  This targets cases where the input to a rotate pattern was a mul or udiv by a constant and InstCombine merged one of the shifts with the op.

Patch by: sameconrad (Sam Conrad)

Reviewers: RKSimon, craig.topper, spatel, lebedev.ri, javed.absar

Reviewed By: lebedev.ri

Subscribers: efriedma, kparzysz, llvm-commits

Differential Revision: https://reviews.llvm.org/D47681

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338270 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/AArch64/rotate-extract.ll
test/CodeGen/X86/rotate-extract-vector.ll
test/CodeGen/X86/rotate-extract.ll