target/105459 - allow delayed target option node fixup
authorRichard Biener <rguenther@suse.de>
Fri, 1 Jul 2022 12:11:35 +0000 (14:11 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 19 Jul 2022 09:24:03 +0000 (11:24 +0200)
commit4ed850a568e4d27a2df566f13843714ca80d437e
treeaffcfa7406ca73de46891210a793c7dce6dc7791
parentf25b0b91d13ba26bdf49cd681ed147c037f154d8
target/105459 - allow delayed target option node fixup

The following avoids the need to massage the target optimization
node at WPA time when we fixup the optimization node, copying
FP related flags from callee to caller.  The target is already
set up to fixup, but that only works when not switching between
functions.  After fixing that the fixup is then done at LTRANS
time when materializing the function.

2022-07-01  Richard Biener  <rguenthert@suse.de>

PR target/105459
* config/i386/i386-options.cc (ix86_set_current_function):
Rebuild the target optimization node whenever necessary,
not only when the optimization node didn't change.

* gcc.dg/lto/pr105459_0.c: New testcase.

(cherry picked from commit 4c94382a132a4b2b9d020806549a006fa6764d1b)
gcc/config/i386/i386-options.cc
gcc/testsuite/gcc.dg/lto/pr105459_0.c [new file with mode: 0644]