[clang] [llvm] [ValueTracking] Teach isGuaranteedNotToBeUndefOrPoison about splats (PR #163570)
David Sherwood via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 20 01:08:57 PDT 2025
================
@@ -7695,6 +7695,11 @@ static bool isGuaranteedNotToBeUndefOrPoison(
}
if (IsWellDefined)
return true;
+ } else if (auto *Splat = isa<ShuffleVectorInst>(Opr) ? getSplatValue(Opr)
----------------
david-arm wrote:
Just curious about how `auto` actually works here when selecting between two possibilities? It could choose `nullptr`, in which case it might be `void *` I presume? I can only assume it creates the type based on the first option, i.e. `getSplatValue`. I just wasn't sure whether the code compiles because of luck or an actual C++ specification based on ordering.
https://github.com/llvm/llvm-project/pull/163570
More information about the cfe-commits
mailing list