[PATCH] D48467: [X86] Recognize a splat of negate in isFNEG
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 3 03:37:29 PDT 2018
RKSimon added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36937
+ }
+ auto Opc = Op.getOpcode();
+ if (Opc == ISD::INSERT_VECTOR_ELT) {
----------------
unsigned - only use auto when the type is very obvious
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36965
+ // Extract constant bits and see if they are all sign bit masks. Ignore the
+ // undef elements.
+ if (getTargetConstantBitsFromNode(Op1, Op1.getScalarValueSizeInBits(),
----------------
Do we have test coverage for ignoring the undefs?
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36970
+ /* AllowPartialUndefs */ false)) {
+ for (unsigned I = 0; I < EltBits.size(); I++)
+ if (!UndefElts[I] && !EltBits[I].isSignMask())
----------------
```
for (unsigned I = 0, E = EltBits.size(); I < E; I++)
```
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36980
+ std::swap(Op0, Op1);
+ return Negate(Op0, Op1);
}
----------------
Why did you create the lambda? Why not just inline Negate?
Repository:
rL LLVM
https://reviews.llvm.org/D48467
More information about the llvm-commits
mailing list