diff --git a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp index b3d439a6f113..794e279501b8 100644 --- a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp +++ b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp @@ -752,6 +752,12 @@ static bool narrowSDivOrSRem(BinaryOperator *Instr, const ConstantRange &LCR, assert(Instr->getOpcode() == Instruction::SDiv || Instr->getOpcode() == Instruction::SRem); + // EVM local begin + Triple TT(Instr->getFunction()->getParent()->getTargetTriple()); + if (TT.isEVM()) + return false; + // EVM local end + // Find the smallest power of two bitwidth that's sufficient to hold Instr's // operands. unsigned OrigWidth = Instr->getType()->getScalarSizeInBits(); @@ -885,6 +891,12 @@ static bool narrowUDivOrURem(BinaryOperator *Instr, const ConstantRange &XCR, assert(Instr->getOpcode() == Instruction::UDiv || Instr->getOpcode() == Instruction::URem); + // EVM local begin + Triple TT(Instr->getFunction()->getParent()->getTargetTriple()); + if (TT.isEVM()) + return false; + // EVM local end + // Find the smallest power of two bitwidth that's sufficient to hold Instr's // operands.