Open Quuxplusone opened 7 years ago
Bugzilla Link | PR31266 |
Status | NEW |
Importance | P normal |
Reported by | kuanghe@ca.ibm.com |
Reported on | 2016-12-05 09:50:12 -0800 |
Last modified on | 2016-12-06 09:46:17 -0800 |
Version | 3.9 |
Hardware | Other Linux |
CC | dgregor@apple.com, ehsanamiri@gmail.com, hfinkel@anl.gov, jtony@ca.ibm.com, kit.barton@gmail.com, llvm-bugs@lists.llvm.org, nemanja.i.ibm@gmail.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
The builtin is incorrectly defined because the related intrinsic takes an
immediate operand. This fixes it (although we should add a sema check for the
range of the parameter):
Index: include/clang/Basic/BuiltinsPPC.def
===================================================================
--- include/clang/Basic/BuiltinsPPC.def (revision 288810)
+++ include/clang/Basic/BuiltinsPPC.def (working copy)
@@ -56,7 +56,7 @@ BUILTIN(__builtin_altivec_vcfux, "V4fV4ii", "")
BUILTIN(__builtin_altivec_vctsxs, "V4SiV4fi", "")
BUILTIN(__builtin_altivec_vctuxs, "V4UiV4fi", "")
-BUILTIN(__builtin_altivec_dss, "vUi", "")
+BUILTIN(__builtin_altivec_dss, "vIi", "")
BUILTIN(__builtin_altivec_dssall, "v", "")
BUILTIN(__builtin_altivec_dst, "vvC*iUi", "")
BUILTIN(__builtin_altivec_dstt, "vvC*iUi", "")
Index: lib/Headers/altivec.h
===================================================================
--- lib/Headers/altivec.h (revision 288810)
+++ lib/Headers/altivec.h (working copy)
@@ -3307,11 +3307,8 @@ static __inline__ vector double __ATTRS_o_ai vec_d
#endif
/* vec_dss */
+#define vec_dss __builtin_altivec_dss
-static __inline__ void __attribute__((__always_inline__)) vec_dss(int __a) {
- __builtin_altivec_dss(__a);
-}
-
/* vec_dssall */
static __inline__ void __attribute__((__always_inline__)) vec_dssall(void) {