target/112280 - properly guard permute query
The following adds guards avoiding code generation to expand_perm_as_a_vlbr_vstbr_candidate when d.testing_p. PR target/112280 * config/s390/s390.cc (expand_perm_as_a_vlbr_vstbr_candidate): Do not generate code when d.testing_p.
This commit is contained in:
parent
cc9cac9f07
commit
655b6cb1ea
1 changed files with 24 additions and 12 deletions
|
@ -17867,33 +17867,45 @@ expand_perm_as_a_vlbr_vstbr_candidate (const struct expand_vec_perm_d &d)
|
|||
|
||||
if (memcmp (d.perm, perm[0], MAX_VECT_LEN) == 0)
|
||||
{
|
||||
rtx target = gen_rtx_SUBREG (V8HImode, d.target, 0);
|
||||
rtx op0 = gen_rtx_SUBREG (V8HImode, d.op0, 0);
|
||||
emit_insn (gen_bswapv8hi (target, op0));
|
||||
if (!d.testing_p)
|
||||
{
|
||||
rtx target = gen_rtx_SUBREG (V8HImode, d.target, 0);
|
||||
rtx op0 = gen_rtx_SUBREG (V8HImode, d.op0, 0);
|
||||
emit_insn (gen_bswapv8hi (target, op0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (memcmp (d.perm, perm[1], MAX_VECT_LEN) == 0)
|
||||
{
|
||||
rtx target = gen_rtx_SUBREG (V4SImode, d.target, 0);
|
||||
rtx op0 = gen_rtx_SUBREG (V4SImode, d.op0, 0);
|
||||
emit_insn (gen_bswapv4si (target, op0));
|
||||
if (!d.testing_p)
|
||||
{
|
||||
rtx target = gen_rtx_SUBREG (V4SImode, d.target, 0);
|
||||
rtx op0 = gen_rtx_SUBREG (V4SImode, d.op0, 0);
|
||||
emit_insn (gen_bswapv4si (target, op0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (memcmp (d.perm, perm[2], MAX_VECT_LEN) == 0)
|
||||
{
|
||||
rtx target = gen_rtx_SUBREG (V2DImode, d.target, 0);
|
||||
rtx op0 = gen_rtx_SUBREG (V2DImode, d.op0, 0);
|
||||
emit_insn (gen_bswapv2di (target, op0));
|
||||
if (!d.testing_p)
|
||||
{
|
||||
rtx target = gen_rtx_SUBREG (V2DImode, d.target, 0);
|
||||
rtx op0 = gen_rtx_SUBREG (V2DImode, d.op0, 0);
|
||||
emit_insn (gen_bswapv2di (target, op0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (memcmp (d.perm, perm[3], MAX_VECT_LEN) == 0)
|
||||
{
|
||||
rtx target = gen_rtx_SUBREG (V1TImode, d.target, 0);
|
||||
rtx op0 = gen_rtx_SUBREG (V1TImode, d.op0, 0);
|
||||
emit_insn (gen_bswapv1ti (target, op0));
|
||||
if (!d.testing_p)
|
||||
{
|
||||
rtx target = gen_rtx_SUBREG (V1TImode, d.target, 0);
|
||||
rtx op0 = gen_rtx_SUBREG (V1TImode, d.op0, 0);
|
||||
emit_insn (gen_bswapv1ti (target, op0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue