[PATCH] D47113: [CVP] Teach CorrelatedValuePropagation to reduce the width of lshr instruction.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 20 09:18:38 PDT 2018


lebedev.ri updated this revision to Diff 147713.
lebedev.ri edited the summary of this revision.
lebedev.ri added a comment.

Add one more run-line to the phase ordering test to demonstrate
how instcombine is able to cleanup after CVP.

Do note that teaching CVP to only handle the `lshr` width
reduction is already sufficient to replace https://reviews.llvm.org/D46760,
since it reduces use count of `zext`,
thus instcombine is able to propagate it.

I have looked into teaching CVP about `and` handling,
and it will be more complicated.


Repository:
  rL LLVM

https://reviews.llvm.org/D47113

Files:
  lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  test/Transforms/CorrelatedValuePropagation/lshr.ll
  test/Transforms/PhaseOrdering/udiv-urem-instcombine-vs-cvp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47113.147713.patch
Type: text/x-patch
Size: 13332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180520/87e3ef9b/attachment.bin>


More information about the llvm-commits mailing list