Will, Segher:
This patch fixes an error in how the vec_rlnm() builtin parameters are
handled. The current test for this builtin are compile only. The
issue was found in the path that adds the 128-bit operands to the
vec_rlnm() builtin. The new test for the 128-bit operands is a compile
and run test.
Re-tested the patch on Power 9 with no regression errors.
Carl
-----------------------------------------------------------------
gcc/ChangeLog
2020-10-08 Carl Love <[email protected]>
* config/rs6000/altivec.h (vec_rlnm): Fix bug in argument generation.
---
gcc/config/rs6000/altivec.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/rs6000/altivec.h b/gcc/config/rs6000/altivec.h
index 8a2dcda0144..f7720d136c9 100644
--- a/gcc/config/rs6000/altivec.h
+++ b/gcc/config/rs6000/altivec.h
@@ -183,7 +183,7 @@
#define vec_recipdiv __builtin_vec_recipdiv
#define vec_rlmi __builtin_vec_rlmi
#define vec_vrlnm __builtin_vec_rlnm
-#define vec_rlnm(a,b,c) (__builtin_vec_rlnm((a),((c)<<8)|(b)))
+#define vec_rlnm(a,b,c) (__builtin_vec_rlnm((a),((b)<<8)|(c)))
#define vec_rsqrt __builtin_vec_rsqrt
#define vec_rsqrte __builtin_vec_rsqrte
#define vec_signed __builtin_vec_vsigned
--
2.17.1