mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Fix Transforms/ConstProp/2007-02-23-sdiv.ll and PR1215
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34548 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3150642dca
commit
6b178a3801
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user