Fix wrong logic in promotion of signed mul-with-overflow (I pointed this out at
authorDuncan Sands <baldrick@free.fr>
Thu, 17 Feb 2011 12:42:48 +0000 (12:42 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 17 Feb 2011 12:42:48 +0000 (12:42 +0000)
commitfbd53f79f5d475d103fba9303a4aa7e88567dd1a
tree6c3f4ee198772c3db4fa35be243e76573e5c3b2e
parent6904f05e607b6bbdfa96a2ebb628ebf3a1f21455
Fix wrong logic in promotion of signed mul-with-overflow (I pointed this out at
the time but presumably my email got lost).  Examples where the previous logic
got it wrong: (1) a signed i8 multiply of 64 by 2 overflows, but the high part is
zero; (2) a signed i8 multiple of -128 by 2 overflows, but the high part is all
ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125748 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp