[llvm] [SLP] NFC. Use InstructionsState::valid if users just want to know whether VL has same opcode. (PR #120217)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 23 05:29:47 PST 2024
================
@@ -836,6 +836,8 @@ class InstructionsState {
return getOpcode() == CheckedOpcode || getAltOpcode() == CheckedOpcode;
}
+ bool valid() const { return MainOp != nullptr; }
----------------
alexey-bataev wrote:
```suggestion
/// Checks if the current state is valid, i.e. has non-null MainOp
bool valid() const { return MainOp; }
```
https://github.com/llvm/llvm-project/pull/120217
More information about the llvm-commits
mailing list