gnu/gcc/6da0b1468bfc4fbf4e8029b9dd634c31cb8261d8 arc: Don't advertise optab for unsupported vector modes [PR126243]
<voptab>v2si3 advertised V2SImode optabs (mul/div/smin/smax) whenever the
scalar op existed, but V2SImode is only a supported vector mode under
TARGET_PLUS_QMACW.
Since r15-5493-g485ab50c204ddb ("Add helpers to test whether an optab
can be implemented") the middle-end keeps the operation vectorized on
such cores. The operands degrade to DImode and it is expanded as a
double-word scalar op: mul and div silently compute on the packed pair,
min and max ICE in expand_expr_real_2 for lack of a DImode expansion.
Require TARGET_PLUS_QMACW so the optab matches
arc_vector_mode_supported_p.
No tests added because this is already covered by existing tests.
PR target/126243
gcc/ChangeLog:
* config/arc/simdext.md (<voptab>v2si3): Require TARGET_PLUS_QMACW.
Signed-off-by: Michiel Derhaeg <michiel.derhaeg@globalfoundries.com>
1 file changed