[llvm] [LV] Provide utility routine to find uncounted exit recipes (PR #152530)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 11 05:48:44 PDT 2025


================
@@ -148,6 +148,8 @@ class LLVM_ABI_FOR_TEST VPValue {
     return Current != user_end();
   }
 
+  bool hasOneUse() const { return getNumUsers() == 1; }
----------------
david-arm wrote:

The name of the function doesn't match the code, i.e. one use != one user. I think it should either be:

```
bool hasOneUser() const { return getNumUsers() == 1; }
```

or

```
bool hasOneUse() const { return getNumUses() == 1; }
```


https://github.com/llvm/llvm-project/pull/152530


More information about the llvm-commits mailing list