[PATCH] D108750: [PowerPC] common chains to reuse offsets to reduce register pressure
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 29 05:06:55 PDT 2021
shchenz added a comment.
In D108750#3095793 <https://reviews.llvm.org/D108750#3095793>, @ro wrote:
> This patch broke the Solaris build:
>
> /vol/llvm/src/llvm-project/dist/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp: In member function ‘bool {anonymous}::PPCLoopInstrFormPrep::prepareBasesForCommoningChains({anonymous}::Bucket&)’:
> /vol/llvm/src/llvm-project/dist/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp:497:37: error: call of overloaded ‘sqrt(unsigned int&)’ is ambiguous
> 497 | ChainNum = (unsigned)sqrt(EleNum);
> | ^
> In file included from /vol/gcc-10/.11.4-gas-64/lib/gcc/amd64-pc-solaris2.11/10.1.0/include-fixed/math.h:24,
> from /vol/gcc-10/.11.4-gas-64/include/c++/10.1.0/bits/std_abs.h:40,
> from /vol/gcc-10/.11.4-gas-64/include/c++/10.1.0/cstdlib:77,
> from /vol/gcc-10/.11.4-gas-64/include/c++/10.1.0/bits/stl_algo.h:59,
> from /vol/gcc-10/.11.4-gas-64/include/c++/10.1.0/algorithm:62,
> from /vol/llvm/src/llvm-project/dist/llvm/include/llvm/ADT/Hashing.h:51,
> from /vol/llvm/src/llvm-project/dist/llvm/include/llvm/ADT/Optional.h:18,
> from /vol/llvm/src/llvm-project/dist/llvm/include/llvm/ADT/STLExtras.h:19,
> from /vol/llvm/src/llvm-project/dist/llvm/lib/Target/PowerPC/PPCFrameLowering.h:15,
> from /vol/llvm/src/llvm-project/dist/llvm/lib/Target/PowerPC/PPCSubtarget.h:16,
> from /vol/llvm/src/llvm-project/dist/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp:79:
> /vol/gcc-10/.11.4-gas-64/lib/gcc/amd64-pc-solaris2.11/10.1.0/include-fixed/iso/math_iso.h:220:21: note: candidate: ‘long double std::sqrt(long double)’
> 220 | inline long double sqrt(long double __X) { return __sqrtl(__X); }
> | ^~~~
> /vol/gcc-10/.11.4-gas-64/lib/gcc/amd64-pc-solaris2.11/10.1.0/include-fixed/iso/math_iso.h:186:15: note: candidate: ‘float std::sqrt(float)’
> 186 | inline float sqrt(float __X) { return __sqrtf(__X); }
> | ^~~~
> /vol/gcc-10/.11.4-gas-64/lib/gcc/amd64-pc-solaris2.11/10.1.0/include-fixed/iso/math_iso.h:74:15: note: candidate: ‘double std::sqrt(double)’
> 74 | extern double sqrt __P((double));
> | ^~~~
>
> Can be fixed e.g. by casting `EleNum` to `double`.
Thanks for reporting. 7591d2103222d712b589600a7f7bc19683152bdd <https://reviews.llvm.org/rG7591d2103222d712b589600a7f7bc19683152bdd> is committed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108750/new/
https://reviews.llvm.org/D108750
More information about the llvm-commits
mailing list