]> git.ipfire.org Git - thirdparty/gcc.git/commit
Don't pass booleans as mask types to simd clones [PR92710]
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 29 Nov 2019 13:04:56 +0000 (13:04 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 18 Feb 2020 08:52:00 +0000 (08:52 +0000)
commit84a465171761faeceb87037a606f7834dab18942
tree529b9a9ee70a76e0bf0ac079f99a5823a1225fef
parent2d8ea3a0a6095a56b7c59c50b1068d602cde934a
Don't pass booleans as mask types to simd clones [PR92710]

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.

2020-02-18  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
Backport from mainline
2019-11-29  Richard Sandiford  <richard.sandiford@arm.com>

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.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr92710.c [new file with mode: 0644]
gcc/tree-vect-stmts.c