slp: check that the operation we're combing is a boolean operation [PR103741]
authorTamar Christina <tamar.christina@arm.com>
Fri, 17 Dec 2021 10:59:25 +0000 (10:59 +0000)
committerTamar Christina <tamar.christina@arm.com>
Fri, 17 Dec 2021 10:59:33 +0000 (10:59 +0000)
commit411ac94611f164fac7ec1cd5953549c0a56cf43a
tree3ee42ce679f2ff1b2d227e42c686313bc0022eef
parent574c09da48a5a0ff4c32dd4577eaf65bac8c94a0
slp: check that the operation we're combing is a boolean operation [PR103741]

It seems I forgot to check that the operation we're combing when masking the
predicated together are actually predicates types.

Without it we end up accidentally trying to combine a value and a mask.

gcc/ChangeLog:

PR tree-optimization/103741
* tree-vect-stmts.c (vectorizable_operation): Check for boolean.

gcc/testsuite/ChangeLog:

PR tree-optimization/103741
* gcc.target/aarch64/pr103741.c: New test.
gcc/testsuite/gcc.target/aarch64/pr103741.c [new file with mode: 0644]
gcc/tree-vect-stmts.c