Skip to content

Commit 09bb63e

Browse files
committed
Make the altivec intrinsics that require immediate constant propagation
macros rather than functions. Unfortunately couldn't come up with a simple testcase that didn't need code generation to verify what was going on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270625 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 27c10ea commit 09bb63e

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

lib/Headers/altivec.h

+12-20
Original file line numberDiff line numberDiff line change
@@ -2102,32 +2102,24 @@ static __inline__ void __attribute__((__always_inline__)) vec_dssall(void) {
21022102
}
21032103

21042104
/* vec_dst */
2105-
2106-
static __inline__ void __attribute__((__always_inline__))
2107-
vec_dst(const void *__a, int __b, int __c) {
2108-
__builtin_altivec_dst(__a, __b, __c);
2109-
}
2105+
#define vec_dst(__PTR, __CW, __STR) \
2106+
__extension__( \
2107+
{ __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR)); })
21102108

21112109
/* vec_dstst */
2112-
2113-
static __inline__ void __attribute__((__always_inline__))
2114-
vec_dstst(const void *__a, int __b, int __c) {
2115-
__builtin_altivec_dstst(__a, __b, __c);
2116-
}
2110+
#define vec_dstst(__PTR, __CW, __STR) \
2111+
__extension__( \
2112+
{ __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR)); })
21172113

21182114
/* vec_dststt */
2119-
2120-
static __inline__ void __attribute__((__always_inline__))
2121-
vec_dststt(const void *__a, int __b, int __c) {
2122-
__builtin_altivec_dststt(__a, __b, __c);
2123-
}
2115+
#define vec_dststt(__PTR, __CW, __STR) \
2116+
__extension__( \
2117+
{ __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR)); })
21242118

21252119
/* vec_dstt */
2126-
2127-
static __inline__ void __attribute__((__always_inline__))
2128-
vec_dstt(const void *__a, int __b, int __c) {
2129-
__builtin_altivec_dstt(__a, __b, __c);
2130-
}
2120+
#define vec_dstt(__PTR, __CW, __STR) \
2121+
__extension__( \
2122+
{ __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR)); })
21312123

21322124
/* vec_eqv */
21332125

0 commit comments

Comments
 (0)