diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2025-05-02 09:46:24 -0700 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2025-05-02 15:13:37 -0700 |
commit | dba5d112691a3e10b722468d94fffeda0fdbb818 (patch) | |
tree | 1a02922e8d1e5e98bdb3919108669029440a6419 /libjava/gnu/java | |
parent | e81f2f4855876c5d85ab9870c5a150ee1a59ee73 (diff) | |
download | gcc-dba5d112691a3e10b722468d94fffeda0fdbb818.zip gcc-dba5d112691a3e10b722468d94fffeda0fdbb818.tar.gz gcc-dba5d112691a3e10b722468d94fffeda0fdbb818.tar.bz2 |
simplify-rtl: Fix crash due to simplify_with_subreg_not [PR120059]
r16-286-gd84fbc516ea57d added a call to simplify_gen_subreg but didn't
check if the result of simplify_gen_subreg was non-null. simplify_gen_subreg
can return NULL if the subreg would be not valid. In the case below we had
a hard register for the SSE register xmm0 of mode SI and doing a subreg to
QI mode but QImode is not a valid mode for the SSE register so simplify_gen_subreg
would return NULL.
This adds the obvious check.
Pushed as obvious after bootstrap/test on x86_64-linux-gnu.
PR rtl-optimization/120059
gcc/ChangeLog:
* simplify-rtx.cc (simplify_with_subreg_not): Check the result
of simplify_gen_subreg.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr120059-1.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libjava/gnu/java')
0 files changed, 0 insertions, 0 deletions