[PATCH] D68811: [CVP] Remove a masking operation if range information implies it's a noop

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 09:45:47 PDT 2019


reames created this revision.
reames added reviewers: apilipenko, nikic, lebedev.ri.
Herald added subscribers: bollu, mcrosier.
Herald added a project: LLVM.

This is really a known bits style transformation, but known bits isn't context sensitive.  The particular case which comes up happens to involve a range which allows range based reasoning to eliminate the mask pattern, so handle that case specifically in CVP.

InstCombine likes to generate the mask-by-low-bits pattern when widening an arithmetic expression which includes a zext in the middle.


Repository:
  rL LLVM

https://reviews.llvm.org/D68811

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68811.224390.patch
Type: text/x-patch
Size: 4890 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191010/3d83855a/attachment.bin>


More information about the llvm-commits mailing list