aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-11-11 21:05:49 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-11-11 21:05:49 +0100
commit4f67832ee1e9929d76bc05cd5daa1c2cf12d0dd0 (patch)
tree1bcccfa307a6e4c937af5cffbaea13772222e300 /gcc/config
parent7cec95887a274390a45b266622ef15dcb1c2b784 (diff)
downloadgcc-4f67832ee1e9929d76bc05cd5daa1c2cf12d0dd0.zip
gcc-4f67832ee1e9929d76bc05cd5daa1c2cf12d0dd0.tar.gz
gcc-4f67832ee1e9929d76bc05cd5daa1c2cf12d0dd0.tar.bz2
re PR bootstrap/92433 (r276645 breaks bootstrap on powerpc)
PR bootstrap/92433 * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Guard ALTIVEC_BUILTIN_VEC_VCMPGE_P argument swapping with n == 3 check. Use std::swap. From-SVN: r278066
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/rs6000/rs6000-c.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index bd4b19d..81db96f 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -6076,14 +6076,14 @@ altivec_build_resolved_builtin (tree *args, int n,
condition (LT vs. EQ, which is recognizable by bit 1 of the first
argument) is reversed. Patch the arguments here before building
the resolved CALL_EXPR. */
- if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
+ if (n == 3
+ && desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
&& desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
&& desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
{
- tree t;
- t = args[2], args[2] = args[1], args[1] = t;
- t = arg_type[2], arg_type[2] = arg_type[1], arg_type[1] = t;
-
+ std::swap (args[1], args[2]);
+ std::swap (arg_type[1], arg_type[2]);
+
args[0] = fold_build2 (BIT_XOR_EXPR, TREE_TYPE (args[0]), args[0],
build_int_cst (NULL_TREE, 2));
}