[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:
Aldo, maybe add implicit conversion to bool to avoid `valid()` call in checks?
https://github.com/llvm/llvm-project/pull/120217
More information about the llvm-commits
mailing list