[PATCH] Add missing builtins to altivec.h for ABI compliance (vol. 2)

Eric Christopher echristo at gmail.com
Wed Jul 1 14:31:53 PDT 2015


Hi Nemanja,

Few inline comments then this looks good to me. Note that this isn't perfectly compatible with the gcc version because of stricter types in things like vec_vsx_ld/st, but I think that's ok here.

The inline comments generally happen quite a few times, but I've only highlighted a single one in general.

Thanks!

-eric


REPOSITORY
  rL LLVM

================
Comment at: lib/CodeGen/CGBuiltin.cpp:6565-6566
@@ +6564,4 @@
+  case PPC::BI__builtin_vsx_xvsqrtsp:
+  case PPC::BI__builtin_vsx_xvsqrtdp:
+  {
+    llvm::Type *ResultType = ConvertType(E->getType());
----------------
Formatting?

================
Comment at: lib/Headers/altivec.h:5338
@@ -5205,3 +5337,3 @@
 
-static __vector float __attribute__((__always_inline__))
+static vector float __attribute__((__always_inline__))
 vec_vrsqrtefp(vector float __a) {
----------------
This change seems unrelated, make it separately?

================
Comment at: lib/Headers/altivec.h:11208
@@ -11024,3 +11207,3 @@
 
-static int __attribute__((__always_inline__))
+static int __ATTRS_o_ai
 vec_all_nge(vector float __a, vector float __b) {
----------------
Make all of these changes separately?

================
Comment at: test/CodeGen/builtins-ppc-vsx.c:36
@@ -35,3 +35,3 @@
 // CHECK: and <2 x i64>
-// CHECK: bitcast <2 x i64> %{{[0-9]*}} to <2 x double>
+// CHECK: bitcast <2 x i64> %{{[0-9]+}} to <2 x double>
 
----------------
Seems like something that should be made separately?

http://reviews.llvm.org/D10875

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list