[llvm] [ValueTracking] Teach isGuaranteedNotToBeUndefOrPoison about splats (PR #163570)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 15 14:33:25 PDT 2025
================
@@ -7695,6 +7696,10 @@ static bool isGuaranteedNotToBeUndefOrPoison(
}
if (IsWellDefined)
return true;
+ } else if (isa<ShuffleVectorInst>(Opr) && (Splat = getSplatValue(Opr))) {
+ // For splats we only need to check the value being splatted.
+ if (OpCheck(Splat))
+ return true;
----------------
antoniofrighetto wrote:
Have one line for the splat value check?
```suggestion
} else if (isa<ShuffleVectorInst>(Opr)) {
// For splats we only need to check the value being splatted.
if (auto *Splat = getSplatValue(Opr); Splat && OpCheck(Splat))
return true;
```
https://github.com/llvm/llvm-project/pull/163570
More information about the llvm-commits
mailing list