Fix vec_cmp comparison mode
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 16 Nov 2016 13:09:12 +0000 (13:09 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 16 Nov 2016 13:09:12 +0000 (13:09 +0000)
commit45a9968b378d54ced8f742e1ff8b01c9378b339c
treee290e8be32aa91661b4bf839f25ff6e966ac6737
parent41c7cac56c4e6fd1f65281ae3a49bc2308be5191
Fix vec_cmp comparison mode

vec_cmps assign the result of a vector comparison to a mask.
The optab was called with the destination having mode mask_mode
but with the source (the comparison) having mode VOIDmode,
which led to invalid rtl if the source operand was used directly.

gcc/
2016-11-15  Richard Sandiford  <richard.sandiford@arm.com>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

* optabs.c (vector_compare_rtx): Add a cmp_mode parameter
and use it in the final call to gen_rtx_fmt_ee.
(expand_vec_cond_expr): Update accordingly.
(expand_vec_cmp_expr): Likewise.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r242489
gcc/ChangeLog
gcc/optabs.c