[PATCH] D50165: [X86] Add a DAG combine for the __builtin_parity idiom used by clang to enable better codegen
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 2 07:48:04 PDT 2018
RKSimon added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:34720
+ (VT != MVT::i64 || (Subtarget.is64Bit() && Subtarget.hasPOPCNT())))
+ return SDValue();
+
----------------
isOperationLegal() ?
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:34732
+ if (!N1C || !N1C->getAPIntValue().isOneValue())
+ return SDValue();
+
----------------
```
if (!isOneConstant(N1))
return SDValue();
```
https://reviews.llvm.org/D50165
More information about the llvm-commits
mailing list