[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
Wed Oct 23 17:48:45 PDT 2019


craig.topper added a comment.

Sorry for the delay a lot of us have been traveling and at the developers conference.



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:42629
 
+    auto ScalarToVector = [&](SDValue X) -> SDValue {
+      X = DAG.getBitcast(CastVT, X);
----------------
This isn't ScalarToVector. It's Vector to wider Vector right?


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:42637
+                         DAG.getConstant(0, DL, VecVT), X,
+                         DAG.getConstant(0, DL, VecIdxVT));
+    };
----------------
You can just use getIntPtrConstant here. VecIdxVT will return pointer type. That's consistent with other insert_subvectors.


================
Comment at: lib/Target/X86/X86TargetTransformInfo.h:88
       X86::FeaturePrefer256Bit,
+      X86::FeaturePreferMaskRegisters,
 
----------------
I think this should be with the CodeGen control options. The FeaturePrefer128Bit/256Bit were special because they are properties of the CPUs and they can be implied by a function attribute.

I can't explain why SlowUAMem32 and SlowUAMem16 are in separate sections....


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