[PATCH] D140210: [IPSCCP] Enable specialization of functions.
Alexandros Lamprineas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 07:13:56 PST 2023
labrinea added a comment.
Herald added a subscriber: StephenFan.
After some experimentation I found that the specialization of `spec_qsort` with `case_bit_test_cmp` as the compare function causes the problem. Digging a little more in the SPEC documentation I found these portability issues which seem to manifest when FuncSpec is enabled:
- https://www.spec.org/cpu2017/Docs/benchmarks/502.gcc_r.html#Portability
> spec_qsort and ANSI aliasing: The spec_qsort.c routine does not strictly obey the ANSI aliasing rules. See the detailed discussion in the documentation for 505.mcf_r, which is where the problem was reported.
- https://www.spec.org/cpu2017/Docs/benchmarks/505.mcf_r.html#Portability
> Some users of GCC 6 (and later) have reported that 505.mcf_r gets wrong answers when compiled with both link-time optimization (LTO) and feedback-directed optimization (FDO), for example at GCC bugzilla 83201.
After I applied the patch attached on that ticket (https://gcc.gnu.org/bugzilla/attachment.cgi?id=42919&action=diff) to the SPEC sources the failure went away. I am puzzled because when cloning a function we do preserve the TBAA medatate if any.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140210/new/
https://reviews.llvm.org/D140210
More information about the llvm-commits
mailing list