[PATCH] D69157: [X86] Prefer KORTEST on Knights Landing or later for memcmp()

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 22:10:39 PDT 2019


craig.topper added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:42624
+        if (OpSize == 128) {
+          A = DAG.WidenVector(A, DL);
+          B = DAG.WidenVector(B, DL);
----------------
WidenVector isn't officially zeroing the upper bits. It's inserting into an undef vector. The assembly for the test cases is coming out correctly, but I think we really need to explicitly put 0s in the upper bits in the DAG.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69157/new/

https://reviews.llvm.org/D69157





More information about the llvm-commits mailing list