mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Don't set the isexact flag if an sdiv operator has been folded into
something else. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78702 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5aa1684e5d
commit
26769d5919
@ -607,7 +607,10 @@ Constant* ConstantVector::get(Constant* const* Vals, unsigned NumVals) {
|
||||
|
||||
Constant* ConstantExpr::getExactSDiv(Constant* C1, Constant* C2) {
|
||||
Constant *C = getSDiv(C1, C2);
|
||||
cast<SDivOperator>(C)->setIsExact(true);
|
||||
// Set exact attribute, assuming constant folding didn't eliminate the
|
||||
// SDiv.
|
||||
if (SDivOperator *SDiv = dyn_cast<SDivOperator>(C))
|
||||
SDiv->setIsExact(true);
|
||||
return C;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user