[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
Tue Jan 2 07:19:06 PST 2018


courbet added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36314
+                    X.getOperand(1).getOpcode() == ISD::XOR;
+  if (isNullConstant(Y) && !IsOrXorXor)
     return SDValue();
----------------
spatel wrote:
> courbet wrote:
> > The `isNullConstant(Y)` is duplicated here with the definition of `IsOrXorXor`. Let's keep it inside `IsOrXorXor` ( and maybe rename to `IsOrXorXorCCZero` ?
> I agree with improving the variable name, but I don't see how we can simplify the logic unless we repeat the OrXorXor checks? We have:
>   A && !(A && B) --> A && (!A || !B) --> A && !B
> where A is isNullConstant and B is OrXorXor
Never mind; I misread the condition. Let's just fix the variable name.


https://reviews.llvm.org/D41618





More information about the llvm-commits mailing list