[PATCH] D153563: Use LVI to eliminate instructions during VP

Simon Hirst via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 08:38:26 PDT 2023


sehirst created this revision.
sehirst added a reviewer: bryanpkc.
Herald added a subscriber: hiraditya.
Herald added a project: All.
sehirst requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

LVI gives us a ConstantRange which we can use to determine if the results of div and shr instructions will always be zero. Similarly, we can determine if one side of max/min instructions will always be returned.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153563

Files:
  llvm/include/llvm/IR/ConstantRange.h
  llvm/lib/IR/ConstantRange.cpp
  llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  llvm/test/Transforms/CorrelatedValuePropagation/ashr.ll
  llvm/test/Transforms/CorrelatedValuePropagation/lshr.ll
  llvm/test/Transforms/CorrelatedValuePropagation/min-max.ll
  llvm/test/Transforms/CorrelatedValuePropagation/sdiv.ll
  llvm/test/Transforms/CorrelatedValuePropagation/udiv.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153563.533628.patch
Type: text/x-patch
Size: 15390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230622/49dd9d8d/attachment.bin>


More information about the llvm-commits mailing list