[llvm] [InstCombine] Do not use operand info in `replaceInInstruction` (PR #99492)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 21 07:51:55 PDT 2024
================
@@ -822,15 +822,25 @@ bool isSafeToSpeculativelyExecute(const Instruction *I,
const Instruction *CtxI = nullptr,
AssumptionCache *AC = nullptr,
const DominatorTree *DT = nullptr,
- const TargetLibraryInfo *TLI = nullptr);
+ const TargetLibraryInfo *TLI = nullptr,
+ bool UseOperandInfo = true);
+
+inline bool isSafeToSpeculativelyExecute(const Instruction *I,
+ BasicBlock::iterator CtxI,
+ AssumptionCache *AC = nullptr,
+ const DominatorTree *DT = nullptr,
+ const TargetLibraryInfo *TLI = nullptr,
+ bool UseOperandInfo = true) {
+ // Take an iterator, and unwrap it into an Instruction *.
+ return isSafeToSpeculativelyExecute(I, &*CtxI, AC, DT, TLI, UseOperandInfo);
----------------
dtcxzyw wrote:
```suggestion
return isSafeToSpeculativelyExecute(I, &*CtxI, AC, DT, TLI, UseVariableInfo);
```
https://github.com/llvm/llvm-project/pull/99492
More information about the llvm-commits
mailing list