https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121623

--- Comment #33 from Frank Scheiner <frank.scheiner at web dot de> ---
For the latest native bootstrap of GCC (gcc-16-20251214) I kept my original
patch to detect any new differences between stage 2 and 3. And indeed there was
a new difference detected for this last bootstrap - plus the already discussed
one for gcc/trans-mem.cc ([1]) is still present w/o changes.

[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121623#c21

The new one is with gcc/tree-ssa-sccvn.cc. This time with a much bigger
difference, see attached diff
(https://gcc.gnu.org/bugzilla/attachment.cgi?id=63256). From a first look the
resulting assembly commands get shuffled over mutliple bundles for this file.
The corresponding testsuite run ([2]) went through similar or better than the
run for GCC 15.1.0 ([3]), so the resulting stage 3 code might be valid as well.

[2]: https://gcc.gnu.org/pipermail/gcc-testresults/2025-December/865397.html

[3]: https://gcc.gnu.org/pipermail/gcc-testresults/2025-August/855566.html

The preprocessed source (now also attached,
https://gcc.gnu.org/bugzilla/attachment.cgi?id=63255) also reproduces the issue
with a cross-compiler:

```
$ ia64-t2-linux-gnu-g++ [-gtoggle] -std=c++20 -fext-numeric-literals
-nostdinc++ -fno-PIE -c -DUSE_LIBUNWIND_EXCEPTIONS  -g -O2 -fno-checking
-DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings  -DHAVE_CONFIG_H -fno-PIE -o
tree-ssa-sccvn.ii.o-stage2 -MT -MMD -MP -MF tree-ssa-sccvn.ii.o-stage2
tree-ssa-sccvn.ii
```
`-fext-numeric-literals` needed to be added to compile successfully.

But here it gets interesting: From past discussions mentioning _selective
scheduling_ I got the impression that this would be used by default for ia64.
But testing showed that this is actually not the case. And adding
`-fselective-scheduling -fselective-scheduling2 -fsel-sched-pipelining
-fsel-sched-pipelining-outer-loops` to the above compile command and perform it
w/ and w/o `-gtoggle` produces identical code. I also looked with `-O3` and
while this - w/o selsched - produces differently sized results - so would fail
size comparisons already - w/selsched, it also produces identical results for
stage 2 and 3.

Reply via email to