diff options
author | Devang Patel <dpatel@apple.com> | 2005-04-11 12:47:44 -0700 |
---|---|---|
committer | Devang Patel <dpatel@gcc.gnu.org> | 2005-04-11 12:47:44 -0700 |
commit | 19f1ebc794e936ef25955c0404e6dac505e6e41e (patch) | |
tree | 0e2811235063b1f5ee3826aca48d7e5f6f27ebbd /gcc | |
parent | 6405f32f73ca5da46d3b42954f78879aaba58946 (diff) | |
download | gcc-19f1ebc794e936ef25955c0404e6dac505e6e41e.zip gcc-19f1ebc794e936ef25955c0404e6dac505e6e41e.tar.gz gcc-19f1ebc794e936ef25955c0404e6dac505e6e41e.tar.bz2 |
rs6000.c (rs6000_emit_vector_select): Fix vector select operand ordering.
* config/rs6000.c (rs6000_emit_vector_select): Fix vector select
operand ordering.
From-SVN: r97981
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ccf583..0818b49 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-04-11 Devang Patel <dpatel@apple.com> + + * config/rs6000.c (rs6000_emit_vector_select): Fix vector select + operand ordering. + 2005-04-11 Andrew Pinski <pinskia@physics.uc.edu> * fold-const.c (fold_binary_op_with_conditional_arg): diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 4bbe702..e3b5cfa 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -10676,9 +10676,11 @@ rs6000_emit_vector_select (rtx dest, rtx op1, rtx op2, rtx mask) temp = gen_reg_rtx (dest_mode); + /* For each vector element, select op1 when mask is 1 otherwise + select op2. */ t = gen_rtx_fmt_ee (SET, VOIDmode, temp, gen_rtx_fmt_Ei (UNSPEC, dest_mode, - gen_rtvec (3, op1, op2, mask), + gen_rtvec (3, op2, op1, mask), vsel_insn_index)); emit_insn (t); emit_move_insn (dest, temp); |