[llvm] IR: Remove null UseList checks in hasNUses methods (PR #165929)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 4 20:35:27 PST 2025
arsenm wrote:
> @arsenm it wasn't relying on uselists of a constant data. It was relying on `hasNUses` call on `Value` (just instruction operands). In this case it was trivial to add a dyn_cast check but currently `hasNUses` feels footgun-y. All "unqualified" (i.e. on plain Value) calls are now suspect.
>
> Also, `hasOneUse` still has the check, if you want to go all the way.
That's a pain. Probably should revert this then
https://github.com/llvm/llvm-project/pull/165929
More information about the llvm-commits
mailing list