r176789 - PR15480: fixed second parameter types of vec_lde, vec_lvebx, vec_lvehx, and vec_lvewx according to AltiVec Programming Interface Manual

Anton Yartsev anton.yartsev at gmail.com
Sun Mar 10 09:25:43 PDT 2013


Author: ayartsev
Date: Sun Mar 10 11:25:43 2013
New Revision: 176789

URL: http://llvm.org/viewvc/llvm-project?rev=176789&view=rev
Log:
PR15480: fixed second parameter types of vec_lde, vec_lvebx, vec_lvehx, and vec_lvewx according to AltiVec Programming Interface Manual

Modified:
    cfe/trunk/lib/Headers/altivec.h
    cfe/trunk/test/CodeGen/builtins-ppc-altivec.c

Modified: cfe/trunk/lib/Headers/altivec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/altivec.h?rev=176789&r1=176788&r2=176789&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/altivec.h (original)
+++ cfe/trunk/lib/Headers/altivec.h Sun Mar 10 11:25:43 2013
@@ -1923,43 +1923,43 @@ vec_lvx(int __a, const float *__b)
 /* vec_lde */
 
 static vector signed char __ATTRS_o_ai
-vec_lde(int __a, const vector signed char *__b)
+vec_lde(int __a, const signed char *__b)
 {
   return (vector signed char)__builtin_altivec_lvebx(__a, __b);
 }
 
 static vector unsigned char __ATTRS_o_ai
-vec_lde(int __a, const vector unsigned char *__b)
+vec_lde(int __a, const unsigned char *__b)
 {
   return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
 }
 
 static vector short __ATTRS_o_ai
-vec_lde(int __a, const vector short *__b)
+vec_lde(int __a, const short *__b)
 {
   return (vector short)__builtin_altivec_lvehx(__a, __b);
 }
 
 static vector unsigned short __ATTRS_o_ai
-vec_lde(int __a, const vector unsigned short *__b)
+vec_lde(int __a, const unsigned short *__b)
 {
   return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
 }
 
 static vector int __ATTRS_o_ai
-vec_lde(int __a, const vector int *__b)
+vec_lde(int __a, const int *__b)
 {
   return (vector int)__builtin_altivec_lvewx(__a, __b);
 }
 
 static vector unsigned int __ATTRS_o_ai
-vec_lde(int __a, const vector unsigned int *__b)
+vec_lde(int __a, const unsigned int *__b)
 {
   return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
 }
 
 static vector float __ATTRS_o_ai
-vec_lde(int __a, const vector float *__b)
+vec_lde(int __a, const float *__b)
 {
   return (vector float)__builtin_altivec_lvewx(__a, __b);
 }
@@ -1967,13 +1967,13 @@ vec_lde(int __a, const vector float *__b
 /* vec_lvebx */
 
 static vector signed char __ATTRS_o_ai
-vec_lvebx(int __a, const vector signed char *__b)
+vec_lvebx(int __a, const signed char *__b)
 {
   return (vector signed char)__builtin_altivec_lvebx(__a, __b);
 }
 
 static vector unsigned char __ATTRS_o_ai
-vec_lvebx(int __a, const vector unsigned char *__b)
+vec_lvebx(int __a, const unsigned char *__b)
 {
   return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
 }
@@ -1981,13 +1981,13 @@ vec_lvebx(int __a, const vector unsigned
 /* vec_lvehx */
 
 static vector short __ATTRS_o_ai
-vec_lvehx(int __a, const vector short *__b)
+vec_lvehx(int __a, const short *__b)
 {
   return (vector short)__builtin_altivec_lvehx(__a, __b);
 }
 
 static vector unsigned short __ATTRS_o_ai
-vec_lvehx(int __a, const vector unsigned short *__b)
+vec_lvehx(int __a, const unsigned short *__b)
 {
   return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
 }
@@ -1995,19 +1995,19 @@ vec_lvehx(int __a, const vector unsigned
 /* vec_lvewx */
 
 static vector int __ATTRS_o_ai
-vec_lvewx(int __a, const vector int *__b)
+vec_lvewx(int __a, const int *__b)
 {
   return (vector int)__builtin_altivec_lvewx(__a, __b);
 }
 
 static vector unsigned int __ATTRS_o_ai
-vec_lvewx(int __a, const vector unsigned int *__b)
+vec_lvewx(int __a, const unsigned int *__b)
 {
   return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
 }
 
 static vector float __ATTRS_o_ai
-vec_lvewx(int __a, const vector float *__b)
+vec_lvewx(int __a, const float *__b)
 {
   return (vector float)__builtin_altivec_lvewx(__a, __b);
 }

Modified: cfe/trunk/test/CodeGen/builtins-ppc-altivec.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtins-ppc-altivec.c?rev=176789&r1=176788&r2=176789&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtins-ppc-altivec.c (original)
+++ cfe/trunk/test/CodeGen/builtins-ppc-altivec.c Sun Mar 10 11:25:43 2013
@@ -484,20 +484,20 @@ void test6() {
   res_vf  = vec_lvx(0, &param_f);               // CHECK: @llvm.ppc.altivec.lvx
 
   /* vec_lde */
-  res_vsc = vec_lde(0, &vsc);                   // CHECK: @llvm.ppc.altivec.lvebx
-  res_vuc = vec_lde(0, &vuc);                   // CHECK: @llvm.ppc.altivec.lvebx
-  res_vs  = vec_lde(0, &vs);                    // CHECK: @llvm.ppc.altivec.lvehx
-  res_vus = vec_lde(0, &vus);                   // CHECK: @llvm.ppc.altivec.lvehx
-  res_vi  = vec_lde(0, &vi);                    // CHECK: @llvm.ppc.altivec.lvewx
-  res_vui = vec_lde(0, &vui);                   // CHECK: @llvm.ppc.altivec.lvewx
-  res_vf  = vec_lde(0, &vf);                    // CHECK: @llvm.ppc.altivec.lvewx
-  res_vsc = vec_lvebx(0, &vsc);                 // CHECK: @llvm.ppc.altivec.lvebx
-  res_vuc = vec_lvebx(0, &vuc);                 // CHECK: @llvm.ppc.altivec.lvebx
-  res_vs  = vec_lvehx(0, &vs);                  // CHECK: @llvm.ppc.altivec.lvehx
-  res_vus = vec_lvehx(0, &vus);                 // CHECK: @llvm.ppc.altivec.lvehx
-  res_vi  = vec_lvewx(0, &vi);                  // CHECK: @llvm.ppc.altivec.lvewx
-  res_vui = vec_lvewx(0, &vui);                 // CHECK: @llvm.ppc.altivec.lvewx
-  res_vf  = vec_lvewx(0, &vf);                  // CHECK: @llvm.ppc.altivec.lvewx
+  res_vsc = vec_lde(0, &param_sc);              // CHECK: @llvm.ppc.altivec.lvebx
+  res_vuc = vec_lde(0, &param_uc);              // CHECK: @llvm.ppc.altivec.lvebx
+  res_vs  = vec_lde(0, &param_s);               // CHECK: @llvm.ppc.altivec.lvehx
+  res_vus = vec_lde(0, &param_us);              // CHECK: @llvm.ppc.altivec.lvehx
+  res_vi  = vec_lde(0, &param_i);               // CHECK: @llvm.ppc.altivec.lvewx
+  res_vui = vec_lde(0, &param_ui);              // CHECK: @llvm.ppc.altivec.lvewx
+  res_vf  = vec_lde(0, &param_f);               // CHECK: @llvm.ppc.altivec.lvewx
+  res_vsc = vec_lvebx(0, &param_sc);            // CHECK: @llvm.ppc.altivec.lvebx
+  res_vuc = vec_lvebx(0, &param_uc);            // CHECK: @llvm.ppc.altivec.lvebx
+  res_vs  = vec_lvehx(0, &param_s);             // CHECK: @llvm.ppc.altivec.lvehx
+  res_vus = vec_lvehx(0, &param_us);            // CHECK: @llvm.ppc.altivec.lvehx
+  res_vi  = vec_lvewx(0, &param_i);             // CHECK: @llvm.ppc.altivec.lvewx
+  res_vui = vec_lvewx(0, &param_ui);            // CHECK: @llvm.ppc.altivec.lvewx
+  res_vf  = vec_lvewx(0, &param_f);             // CHECK: @llvm.ppc.altivec.lvewx
 
   /* vec_ldl */
   res_vsc = vec_ldl(0, &vsc);                   // CHECK: @llvm.ppc.altivec.lvxl





More information about the cfe-commits mailing list