[InstCombine] refactor add narrowing folds; NFCI
authorSanjay Patel <spatel@rotateright.com>
Fri, 14 Sep 2018 20:40:46 +0000 (20:40 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 14 Sep 2018 20:40:46 +0000 (20:40 +0000)
commit2426eb46dd69463744916bfd99f3e4f74c6a6bb8
tree522e55e64cd40e841ca460aedb4dde3267c1c4b8
parent0f30f08b02e5fc426004dad9c379ad1a260797cb
[InstCombine] refactor add narrowing folds; NFCI

The test diffs are all cosmetic due to the change in
value naming, but I'm including that to show that the
new code does perform these folds rather than something
else in instcombine.

llvm-svn: 342278
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/test/Transforms/InstCombine/narrow-math.ll