Reland "[InstCombine] Recognize `((x * y) s/ x) !=/== y` as an signed multiplication...
authorRoman Lebedev <lebedev.ri@gmail.com>
Tue, 7 Sep 2021 17:48:39 +0000 (20:48 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Tue, 7 Sep 2021 18:03:52 +0000 (21:03 +0300)
commit35fa7b8ad83e6cddb38190818df3c6688b3c2313
tree751a6b335286de8e7f10b6d58523314bede3b59e
parent0a5ebc692b93f43c3b61e7571254f8c5e234597a
Reland "[InstCombine] Recognize `((x * y) s/ x) !=/== y` as an signed multiplication overflow check (PR48769)"

This reverts commit 91f7a4fff75179e75d38b692715ae69471668b5e,
relanding commit 13ec913bdf500e2354cc55bf29e2f5d99e0c709e.

The original commit was reverted because of (essentially)
https://bugs.llvm.org/show_bug.cgi?id=35922
which has now been addressed by d0eeb64be5848a7832d13db9d69904db281d02e8.
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/test/Transforms/InstCombine/signed-mul-lack-of-overflow-check-via-mul-sdiv.ll
llvm/test/Transforms/InstCombine/signed-mul-overflow-check-via-mul-sdiv.ll