[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
Sat May 19 16:45:54 PDT 2018


lebedev.ri created this revision.
lebedev.ri added reviewers: spatel, bixia, jlebar, sanjoy, anna, davide, reames.

Counter-proposal to https://reviews.llvm.org/D46760.
I suppose, continuation of https://reviews.llvm.org/D44102.

If the second operand of `udiv`/`urem` is power-of-two, 
instcombine will transform that into `lshr`/`and`,
and CVP does not handle them.
https://godbolt.org/g/hhT9bc

I don't have alive proofs handy at the moment, sorry.


Repository:
  rL LLVM

https://reviews.llvm.org/D47113

Files:
  lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  test/Transforms/CorrelatedValuePropagation/lshr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47113.147687.patch
Type: text/x-patch
Size: 14918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180519/e84b065e/attachment.bin>


More information about the llvm-commits mailing list