diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-02-24 01:19:50 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-02-24 01:19:50 +0000 |
| commit | fb94fe742b56ac1270632180e5dccbe30ff05ddc (patch) | |
| tree | 438c771938efd1cef946267a93ed34fd0e12ed5c /llvm/lib | |
| parent | 3b7c9054378b2fe6fbdcb8b03d3f60d90867b936 (diff) | |
| download | bcm5719-llvm-fb94fe742b56ac1270632180e5dccbe30ff05ddc.tar.gz bcm5719-llvm-fb94fe742b56ac1270632180e5dccbe30ff05ddc.zip | |
Fix Transforms/ConstProp/2007-02-23-sdiv.ll and PR1215
llvm-svn: 34548
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/ConstantFolding.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/ConstantFolding.cpp b/llvm/lib/VMCore/ConstantFolding.cpp index 7cb4b7bfbe5..f0969fce1f1 100644 --- a/llvm/lib/VMCore/ConstantFolding.cpp +++ b/llvm/lib/VMCore/ConstantFolding.cpp @@ -574,7 +574,8 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, if (CI2->isAllOnesValue() && (((CI1->getType()->getPrimitiveSizeInBits() == 64) && (CI1->getSExtValue() == INT64_MIN)) || - (CI1->getSExtValue() == -CI1->getSExtValue()))) + (CI1->getSExtValue() == -CI1->getSExtValue() && + CI1->getSExtValue()))) return 0; // MIN_INT / -1 -> overflow return ConstantInt::get(C1->getType(), CI1->getSExtValue() / CI2->getSExtValue()); |

