[PATCH] D48467: [X86] Recognize a splat of negate in isFNEG

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 3 10:24:48 PDT 2018


eraman marked 3 inline comments as done.
eraman added inline comments.


================
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(),
----------------
RKSimon wrote:
> Do we have test coverage for ignoring the undefs?
test7 of avx2-fma-fneg-combine.ll has fsub with all but one elements of the constant being undef. 


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:36980
+    std::swap(Op0, Op1);
+  return Negate(Op0, Op1);
 }
----------------
RKSimon wrote:
> Why did you create the lambda? Why not just inline Negate?
Carryover from an initial version where I thought the lambda made sense.


Repository:
  rL LLVM

https://reviews.llvm.org/D48467





More information about the llvm-commits mailing list