[PATCH] D101423: [InstCombine] Fold overflow bit of [u|s]mul.with.overflow in a poison-safe way

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 29 20:52:15 PDT 2021


aqjune updated this revision to Diff 341760.
aqjune added a comment.
Herald added a subscriber: mgorny.

- Move the function into the new header file
- Update ValueTracking's impliesPoison to convert select to and/or if valid.

This avoids redundant freeze insertion (see div-by-0-guard-before-smul_ov-not.ll 's t1_commutative)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101423/new/

https://reviews.llvm.org/D101423

Files:
  llvm/include/llvm/Analysis/OverflowInstAnalysis.h
  llvm/lib/Analysis/CMakeLists.txt
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/Analysis/OverflowInstAnalysis.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/test/Transforms/InstCombine/div-by-0-guard-before-smul_ov-not.ll
  llvm/test/Transforms/InstCombine/div-by-0-guard-before-smul_ov.ll
  llvm/test/Transforms/InstCombine/div-by-0-guard-before-umul_ov-not.ll
  llvm/test/Transforms/InstCombine/div-by-0-guard-before-umul_ov.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101423.341760.patch
Type: text/x-patch
Size: 22265 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210430/39366b43/attachment.bin>


More information about the llvm-commits mailing list