]> granicus.if.org Git - llvm/commit
[InstCombine] Remove redundant/bogus mul_with_overflow combines
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 13 Apr 2019 19:43:35 +0000 (19:43 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 13 Apr 2019 19:43:35 +0000 (19:43 +0000)
commit360d0ef49804401c4bd97087a242d51124b7a911
tree9b5aeb508b8b3b615411a473e1d4e49968b189c8
parent6d337902ecb5c452650355bb07a77d00a22527c0
[InstCombine] Remove redundant/bogus mul_with_overflow combines

As pointed out in D60518 folding mulo(%x, undef) to {undef, undef}
isn't correct. As a correct version of this already exists in
InstructionSimplify (https://github.com/llvm-mirror/llvm/blob/bd8056ef326e075cc500f3f0cfcd1193bc200594/lib/Analysis/InstructionSimplify.cpp#L4750-L4757) this is just
dead code though. Drop it together with the mul(%x, 0) -> {0, false}
fold that is also already handled by InstSimplify.

Differential Revision: https://reviews.llvm.org/D60649

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358339 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp