According to documentation, '^' should only have an effect during reload. However ira-costs.cc treats it in the same way as '?' during early costing. As a result using '^' can accidentally disable valid alternatives and cause significant regressions (see PR114741). Avoid this by ignoring '^' during costing.
Passes bootstrap and regress, OK for commit? gcc: PR rtl-optimization/114766 * ira-costs.cc (record_reg_classes): Ignore '^' during costing. --- diff --git a/gcc/ira-costs.cc b/gcc/ira-costs.cc index c86c5a16563aeefac9d4fa72839bee8d95409f4b..04d2f21b023f3456ba6f8c16c2418d7313965b2f 100644 --- a/gcc/ira-costs.cc +++ b/gcc/ira-costs.cc @@ -771,10 +771,6 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, c = *++p; break; - case '^': - alt_cost += 2; - break; - case '?': alt_cost += 2; break;