[all-commits] [llvm/llvm-project] 955f12: [instcombine] Fold overflow check using overflow i...
Philip Reames via All-commits
all-commits at lists.llvm.org
Thu Jul 1 09:42:10 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 955f12589940634acc6c9901e8b25534808f691c
https://github.com/llvm/llvm-project/commit/955f12589940634acc6c9901e8b25534808f691c
Author: Philip Reames <listmail at philipreames.com>
Date: 2021-07-01 (Thu, 01 Jul 2021)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/test/Transforms/InstCombine/saddo.ll
M llvm/test/Transforms/InstCombine/smulo.ll
M llvm/test/Transforms/InstCombine/ssubo.ll
M llvm/test/Transforms/InstCombine/usubo.ll
Log Message:
-----------
[instcombine] Fold overflow check using overflow intrinsic to comparison
This follows up to D104665 (which added umulo handling alongside the existing uaddo case), and generalizes for the remaining overflow intrinsics.
I went to add analogous handling to LVI, and discovered that LVI already had a more general implementation. Instead, we can port was LVI does to instcombine. (For context, LVI uses makeExactNoWrapRegion to constrain the value 'x' in blocks reached after a branch on the condition `op.with.overflow(x, C).overflow`.)
Differential Revision: https://reviews.llvm.org/D104932
More information about the All-commits
mailing list