[PATCH] D24397: Target Power9 bit counting and vector comparison instructions through builtins (front end portion)

Eric Christopher via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 14:23:41 PDT 2016


echristo added inline comments.

================
Comment at: lib/Basic/Targets.cpp:1393
@@ +1392,3 @@
+
+    if (std::find(FeaturesVec.begin(), FeaturesVec.end(), "+power9-vector") !=
+        FeaturesVec.end()) {
----------------
Can you combine this with the power8 check above?

================
Comment at: lib/Basic/Targets.cpp:1500
@@ -1483,3 +1499,3 @@
       Features[Name] = Features["direct-move"] = Features["power8-vector"] =
-          Features["float128"] = false;
+          Features["float128"] = Features["power9-vector"] = false;
     } else {
----------------
This is starting to look a bit complicated here as I think you're now enabling power9 vector on power8? :\

================
Comment at: test/CodeGen/builtins-ppc-p9vector.c:2
@@ +1,3 @@
+// REQUIRES: powerpc-registered-target
+// RUN: %clang_cc1 -faltivec -target-feature +power9-vector \
+// RUN:   -triple powerpc64-unknown-unknown -emit-llvm %s \
----------------
Please no code generation checks in clang. I doubt you really need to even pipe this through opt unless you feel that alloca issues are going to cause problems. I'd prefer just to check unoptimized IR.


Repository:
  rL LLVM

https://reviews.llvm.org/D24397





More information about the cfe-commits mailing list