]> git.ipfire.org Git - thirdparty/gcc.git/commit
ifcvt: Fix store flag of XImode on aarch64 while ifcvt [PR123294]
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Sun, 1 Feb 2026 23:41:52 +0000 (15:41 -0800)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Mon, 2 Feb 2026 17:48:46 +0000 (09:48 -0800)
commite02eba0dc7d1aa62c5edf7108e641bcb5c5584b8
tree4b4388764e251999bac457ca7d90c37123b63f34
parent6b2a3804758bb8e731ad18420cf79fd03cf280d9
ifcvt: Fix store flag of XImode on aarch64 while ifcvt [PR123294]

In the testcase ifcvt is trying to do a emit_store_flag into a XImode.
That will cause an ICE because XImode does not have any arithmetic optabs
associated with it. This is because it is greater than MAX_FIXED_MODE_SIZE
(along other things).
noce_emit_store_flag already has code to reject non-scalar modes, so
this adds a new check for modes that are greater than MAX_FIXED_MODE_SIZE.

Bootstrapped and tested on aarch64-linux-gnu.

PR rtl-optimization/123294

gcc/ChangeLog:

* ifcvt.cc (noce_emit_store_flag): Reject modes
greater than MAX_FIXED_MODE_SIZE.

gcc/testsuite/ChangeLog:

* gcc.dg/pr123294-1.c: New test.
* gcc.target/aarch64/pr123294-1.c: New test.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
gcc/ifcvt.cc
gcc/testsuite/gcc.dg/pr123294-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/pr123294-1.c [new file with mode: 0644]