[llvm] [InstCombine] Look through freeze to find insert instruction (PR #86948)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 06:24:28 PDT 2024
================
@@ -173,6 +173,12 @@ Value *llvm::findScalarElement(Value *V, unsigned EltNo) {
if (Constant *C = dyn_cast<Constant>(V))
return C->getAggregateElement(EltNo);
+ if (auto *F = dyn_cast<FreezeInst>(V)) {
+ if (isGuaranteedNotToBeUndefOrPoison(F)) {
----------------
dtcxzyw wrote:
`isGuaranteedNotToBeUndefOrPoison` always evaluates to true :(
https://github.com/llvm/llvm-project/blob/a3efc53f168b1451803a40075201c3490d6e3928/llvm/lib/Analysis/ValueTracking.cpp#L7038-L7041
https://github.com/llvm/llvm-project/pull/86948
More information about the llvm-commits
mailing list