]> git.ipfire.org Git - thirdparty/gcc.git/commit
ifcvt: Fix force_operand ICE in noce_convert_multiple_sets [PR116353]
authorManolis Tsamis <manolis.tsamis@vrull.eu>
Tue, 13 Aug 2024 08:17:49 +0000 (10:17 +0200)
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>
Tue, 13 Aug 2024 19:52:18 +0000 (21:52 +0200)
commitcc00a737e840986f4916918759ba214a95ae6888
treee7ef5b06eae5c5994e417e0ecfeed068910c0395
parent9988d7e004796ab531df7bcda45788a7aa9276d7
ifcvt: Fix force_operand ICE in noce_convert_multiple_sets [PR116353]

Now that more operations are allowed for noce_convert_multiple_sets,
we need to check noce_can_force_operand on the sequence before calling
try_emit_cmove_seq.  Otherwise an inappropriate argument may be given
to copy_to_mode_reg and result in an ICE.

PR tree-optimization/116353

gcc/ChangeLog:

* ifcvt.cc (bb_ok_for_noce_convert_multiple_sets): Check
noce_can_force_operand.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr116353.c: New test.
gcc/ifcvt.cc
gcc/testsuite/gcc.target/i386/pr116353.c [new file with mode: 0644]