[PATCH] D44102: Teach CorrelatedValuePropagation to reduce the width of udiv/urem instructions.

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 6 02:38:28 PST 2018


jlebar updated this revision to Diff 137140.
jlebar added a comment.

Use getConstantRange instead of getPredicateAt.

The new testcase that checks that sdiv i32 is narrowed to udiv i8 currently
fails because the sdiv i32 -> udiv i32 transition uses getPredicateAt rather
than getConstantRange.


https://reviews.llvm.org/D44102

Files:
  llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  llvm/test/Transforms/CorrelatedValuePropagation/udiv.ll
  llvm/test/Transforms/CorrelatedValuePropagation/urem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44102.137140.patch
Type: text/x-patch
Size: 6540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180306/d3512b97/attachment.bin>


More information about the llvm-commits mailing list