From 09bb63e67d571ad1378716c69e27b67ea1107d71 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 24 May 2016 22:25:06 +0000 Subject: [PATCH] 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 --- lib/Headers/altivec.h | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/lib/Headers/altivec.h b/lib/Headers/altivec.h index 77bc928615..74a1914ce8 100644 --- a/lib/Headers/altivec.h +++ b/lib/Headers/altivec.h @@ -2102,32 +2102,24 @@ static __inline__ void __attribute__((__always_inline__)) vec_dssall(void) { } /* vec_dst */ - -static __inline__ void __attribute__((__always_inline__)) -vec_dst(const void *__a, int __b, int __c) { - __builtin_altivec_dst(__a, __b, __c); -} +#define vec_dst(__PTR, __CW, __STR) \ + __extension__( \ + { __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR)); }) /* vec_dstst */ - -static __inline__ void __attribute__((__always_inline__)) -vec_dstst(const void *__a, int __b, int __c) { - __builtin_altivec_dstst(__a, __b, __c); -} +#define vec_dstst(__PTR, __CW, __STR) \ + __extension__( \ + { __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR)); }) /* vec_dststt */ - -static __inline__ void __attribute__((__always_inline__)) -vec_dststt(const void *__a, int __b, int __c) { - __builtin_altivec_dststt(__a, __b, __c); -} +#define vec_dststt(__PTR, __CW, __STR) \ + __extension__( \ + { __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR)); }) /* vec_dstt */ - -static __inline__ void __attribute__((__always_inline__)) -vec_dstt(const void *__a, int __b, int __c) { - __builtin_altivec_dstt(__a, __b, __c); -} +#define vec_dstt(__PTR, __CW, __STR) \ + __extension__( \ + { __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR)); }) /* vec_eqv */ -- 2.40.0