[llvm] [InstCombine] Do not use operand info in `replaceInInstruction` (PR #99492)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 08:07:13 PDT 2024
================
@@ -6796,12 +6797,15 @@ bool llvm::isSafeToSpeculativelyExecuteWithOpcode(
case Instruction::URem: {
// x / y is undefined if y == 0.
const APInt *V;
- if (match(Inst->getOperand(1), m_APInt(V)))
+ if (UseOperandInfo && match(Inst->getOperand(1), m_APInt(V)))
----------------
goldsteinn wrote:
While I think defacto this would be fine, the usage that broke my patch way back when was truncation of division operands which did modify the non-const operands.
https://github.com/llvm/llvm-project/pull/99492
More information about the llvm-commits
mailing list