[PATCH] D60649: [InstCombine] Remove redundant/bogus mul_with_overflow folds
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 13 02:42:15 PDT 2019
lebedev.ri added a comment.
In D60649#1465376 <https://reviews.llvm.org/D60649#1465376>, @nikic wrote:
> @lebedev.ri These folds already are in instsimplify, see link in the description.
*these* - yes, i seen the link.
I really meant *all* of the constant-folds that are in this function, let me highlight most(?) of them
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:3966-3968
// X + 0 -> {X, false}
if (match(RHS, m_Zero()))
return SetResult(LHS, Builder.getFalse(), false);
----------------
not in instsimplify
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:3990-3992
// X - 0 -> {X, false}
if (match(RHS, m_Zero()))
return SetResult(LHS, Builder.getFalse(), false);
----------------
not in instsimplify
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:4014-4016
// X * 1 -> {X, false}
if (match(RHS, m_One()))
return SetResult(LHS, Builder.getFalse(), false);
----------------
not in instsimplify
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60649/new/
https://reviews.llvm.org/D60649
More information about the llvm-commits
mailing list