[llvm] IVDesc: unify RecurKinds IAnyOf and FAnyOf (PR #118393)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 08:10:03 PST 2025


================
@@ -209,7 +207,9 @@ class RecurrenceDescriptor {
 
   RecurKind getRecurrenceKind() const { return Kind; }
 
-  unsigned getOpcode() const { return getOpcode(getRecurrenceKind()); }
+  unsigned getOpcode() const {
+    return getOpcode(getRecurrenceKind(), getRecurrenceType());
----------------
david-arm wrote:

OK I think I see what you mean. `getRecurrenceType` returns `RecurrenceType`, which was defined when the `RecurrenceDescriptor` object was constructed. Are you saying that the type assigned at construction refers to the select result, rather than the comparison type? If so, I'm a bit confused about how this patch even works? Presumably that means the opcode is never actually used for anything, at least for the AnyOf path?

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


More information about the llvm-commits mailing list