[PATCH] D47012: [X86] Scalar mask and scalar move optimizations

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 25 10:55:35 PDT 2018


craig.topper added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:32207
+      // LHS and RHS swapped due to
+      // setcc outputting 1 when AND resulted in 0 and vice versa.
+      return DAG.getNode(ISD::SELECT, DL, VT, AndNode, RHS, LHS);
----------------
You might still need a truncate on the AND if it isn't an i8


================
Comment at: lib/Target/X86/X86InstrFMA.td:369
+                               ValueType VT, ValueType EltVT> {
+  let Predicates = [HasFMA] in {
+    def : Pat<(VT (Move (VT VR128:$src2), (VT (scalar_to_vector
----------------
This should be [HasFMA, NoAVX512]. And the AVX512InstrInfo.td needs an equivalent set of patterns mapped to the unmasked EVEX instructions.


Repository:
  rL LLVM

https://reviews.llvm.org/D47012





More information about the llvm-commits mailing list