https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92710

--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
Author: rsandifo
Date: Fri Nov 29 13:04:56 2019
New Revision: 278839

URL: https://gcc.gnu.org/viewcvs?rev=278839&root=gcc&view=rev
Log:
Don't pass booleans as mask types to simd clones (PR 92710)

In this PR we assigned a vector mask type to the result of a comparison
and then tried to pass that mask type to a simd clone, which expected
a normal (non-mask) type instead.

This patch simply punts on call arguments that have a mask type.
A better fix would be to pattern-match the comparison to a COND_EXPR,
like we would if the comparison was stored to memory, but doing that
isn't gcc 9 or 10 material.

Note that this doesn't affect x86_64-linux-gnu because the ABI promotes
bool arguments to ints.

2019-11-29  Richard Sandiford  <richard.sandif...@arm.com>

gcc/
        PR tree-optimization/92710
        * tree-vect-stmts.c (vectorizable_simd_clone_call): Reject
        vector mask arguments.

gcc/testsuite/
        PR tree-optimization/92710
        * gcc.dg/vect/pr92710.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr92710.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-stmts.c

Reply via email to