fix another miscompile in the llvm.sadd formation logic: it wasn't
authorChris Lattner <sabre@nondot.org>
Sun, 19 Dec 2010 18:22:06 +0000 (18:22 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 19 Dec 2010 18:22:06 +0000 (18:22 +0000)
commitdd7e83737491b14ebf98e09fa6cb9b515f9f2e3e
treecdfd1a40046996f8fc5842e43ad4ffdf6d65d38b
parentd959da92a5a479c7f8f4ccbf7a7e3fb87f9fda0c
fix another miscompile in the llvm.sadd formation logic: it wasn't
checking to see if the high bits of the original add result were dead.
Inserting a smaller add and zexting back to that size is not good enough.

This is likely to be the fix for 8816.

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