[PATCH] D41618: [x86] allow pairs of PCMPEQ for vector-sized integer equality comparisons (PR33325)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 2 07:15:02 PST 2018
spatel marked 3 inline comments as done.
spatel added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36314
+ X.getOperand(1).getOpcode() == ISD::XOR;
+ if (isNullConstant(Y) && !IsOrXorXor)
return SDValue();
----------------
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
https://reviews.llvm.org/D41618
More information about the llvm-commits
mailing list