[PATCH] D69183: [CVP] When proving that @llvm.with.overflow()/@llvm.sat() don't overflow, also try to prove other no-wrap

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 10:30:20 PDT 2019


lebedev.ri created this revision.
lebedev.ri added reviewers: nikic, spatel, reames.
lebedev.ri added a project: LLVM.
Herald added a subscriber: hiraditya.
lebedev.ri updated this revision to Diff 225660.
lebedev.ri added a comment.

Typos


CVP, unlike InstCombine, does not run till exaustion.
It only does a single pass.

When dealing with those special binops, if we prove that they can
safely be demoted into their usual binop form,
we do set the no-wrap we deduced. But when dealing with usual binops,
we try to deduce both no-wraps.

So if we convert e.g. @llvm.uadd.with.overflow() to `add nuw`,
we won't attempt to check whether it can be `add nuw nsw`.

This patch proposes to call `processBinOp()` on newly-created binop.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69183

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69183.225660.patch
Type: text/x-patch
Size: 7611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191018/03e61bb4/attachment.bin>


More information about the llvm-commits mailing list