aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-06-18 14:45:03 +0200
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:14:00 -0300
commit8dcdfcbeb6a78782097096cad84ca2318ff02675 (patch)
treee00daad943f73f6ec2d3a21aa9e29c993129c137
parent3db013e8a61611f8c700637a6f4c181a122f8e5e (diff)
downloadgcc-8dcdfcbeb6a78782097096cad84ca2318ff02675.zip
gcc-8dcdfcbeb6a78782097096cad84ca2318ff02675.tar.gz
gcc-8dcdfcbeb6a78782097096cad84ca2318ff02675.tar.bz2
middle-end/95739 - fix vector condition IFN expansion
This fixes the omission of moving the expansion result to the target. 2020-06-18 Richard Biener <rguenther@suse.de> PR middle-end/95739 * internal-fn.c (expand_vect_cond_optab_fn): Move the result to the target if necessary. (expand_vect_cond_mask_optab_fn): Likewise.
-rw-r--r--gcc/internal-fn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index 644f234..2329e3d 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -2589,6 +2589,8 @@ expand_vect_cond_optab_fn (internal_fn, gcall *stmt, convert_optab optab)
create_fixed_operand (&ops[4], XEXP (comparison, 0));
create_fixed_operand (&ops[5], XEXP (comparison, 1));
expand_insn (icode, 6, ops);
+ if (!rtx_equal_p (ops[0].value, target))
+ emit_move_insn (target, ops[0].value);
}
#define expand_vec_cond_optab_fn expand_vect_cond_optab_fn
@@ -2629,6 +2631,8 @@ expand_vect_cond_mask_optab_fn (internal_fn, gcall *stmt, convert_optab optab)
create_input_operand (&ops[2], rtx_op2, mode);
create_input_operand (&ops[3], mask, mask_mode);
expand_insn (icode, 4, ops);
+ if (!rtx_equal_p (ops[0].value, target))
+ emit_move_insn (target, ops[0].value);
}
#define expand_vec_cond_mask_optab_fn expand_vect_cond_mask_optab_fn