gnu /
gcc /
f3dcc49945ea9ba0355d5c87686c0ed99e7c233d crc: Fix up ICE from optimize_crc_loop [PR120677]
The following testcase ICEs, because optimize_crc_loop inserts a call
statement before labels instead of after labels.
Fixed thusly (plus fixed other issues noticed around it).
2025-06-17 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/120677
* gimple-crc-optimization.cc (crc_optimization::optimize_crc_loop):
Insert before gsi_after_labels instead of gsi_start_bb. Use
gimple_bb (output_crc) instead of output_crc->bb. Formatting fix.
* gcc.c-torture/execute/pr120677.c: New test.
(cherry picked from commit 75ffef5c6fa4e6e9576285e0403c06728309ae3e)
2 files changed