Prevents generation of a vec_duplicate with illegal predicate in
<ASHIFT:optab><mode>3.
gcc/ChangeLog:
2021-02-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
PR target/98657
* config/aarch64/aarch64-sve.md (<ASHIFT:optab><mode>3): Use
expand_vector_broadcast' to emit the vec_duplicate operand.
gcc/testsuite/ChangeLog:
2021-02-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
PR target/98657
* gcc.target/aarch64/sve/pr98657.c: New test.
}
else
{
- amount = gen_reg_rtx (<MODE>mode);
- emit_insn (gen_vec_duplicate<mode> (amount,
- convert_to_mode (<VEL>mode,
- operands[2], 0)));
+ amount = convert_to_mode (<VEL>mode, operands[2], 0);
+ amount = expand_vector_broadcast (<MODE>mode, amount);
}
emit_insn (gen_v<optab><mode>3 (operands[0], operands[1], amount));
DONE;
--- /dev/null
+/* PR target/98657 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -msve-vector-bits=256" } */
+extern char a[];
+void b(_Bool c[][18]) {
+ int d;
+ for (int e = 0; e < 23; e++)
+ a[e] = 6 >> c[1][d];
+}