[PATCH] D41618: [x86] allow pairs of PCMPEQ for vector-sized integer equality comparisons (PR33325)
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 1 23:35:03 PST 2018
courbet added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36308
+
+ // Ignore a comparison with zero because that gets special treatment in
+ // EmitTest(). But make an exception for the special case of a pair of
----------------
I would add a comment to explain when this is typically generated, else this feels a bit magic. Something along the lines of:
"This pattern is typically generated by the memcmp expansion pass with oversized integer compares (see PR33325)."
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36314
+ X.getOperand(1).getOpcode() == ISD::XOR;
+ if (isNullConstant(Y) && !IsOrXorXor)
return SDValue();
----------------
The `isNullConstant(Y)` is duplicated here with the definition of `IsOrXorXor`. Let's keep it inside `IsOrXorXor` ( and maybe rename to `IsOrXorXorCCZero` ?
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36332
+ // This is a bitwise-combined equality comparison of 2 pairs of vectors:
+ // setcc i128 (or (xor A, B), (xor C, D)), 0, eq
+ // Use 2 vector equality compares and 'and' the results before doing a
----------------
`eq`: this is a bit misleading on the first read. Change to `eq|ne` or `cc` ?
https://reviews.llvm.org/D41618
More information about the llvm-commits
mailing list