search for: powf

Displaying 20 results from an estimated 46 matches for "powf".

Did you mean: powe
2008 Mar 03
1
[LLVMdev] Cloning a function
...small program generated at run-time. Whenever a function call for to one of the builtin functions is being called we use CloneFunction to clone the instruction from the library module and insert it in the generated module. The problem is for example when we have something like: declare float @powf(float, float) define void @pow(<4 x float>* %res, /*other args*/...) { entry: ... %call = tail call float @powf( float %tmp1, float %tmp3 ) ... } while powf has a similar extern declaration in the generated module, the cloned function after the CloneFunction call obviously refers to the p...
2012 Sep 06
1
[LLVMdev] [NVPTX] powf intrinsic in unimplemented
Dear all, During app compilation we have a crash in NVPTX backend: LLVM ERROR: Cannot select: 0x732b270: i64 = ExternalSymbol'__powisf2' [ID=18] As I understand LLVM tries to lower the following call %28 = call ptx_device float @llvm.powi.f32(float 2.000000e+00, i32 %8) nounwind readonly to device intrinsic. The table llvm/IntrinsicsNVVM.td does not contain such intrinsic, however it
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
...ely be sub-ulp accurate, which means that it should *not* be implemented via log( ) and exp( ), and indeed, most math libraries don’t do that. Just to provide some example data, for single-precision x in [1,2) on current OS X: The worst-case error of x*x*x is 1.28736 ulp The worst-case error of powf(x, 3) is 0.500013 ulp The RMS error of x*x*x is 0.585066 ulp The RMS error of powf(x,3) is 0.499984 ulp – Steve
2015 Feb 04
6
[LLVMdev] llvm builtins
In the following example with gcc style builtins, in once case llvm.powi.f64 is emitted and in the other just a call to library function powf. ~/llvm/build/Debug+Asserts/bin/clang -S -emit-llvm pow1.c Why is that? Is there a way to force the call to an llvm style builtin? Tia. Reed -------------- next part -------------- A non-text attachment was scrubbed... Name: pow1.c Type: text/x-csrc Size: 269 bytes Desc: not available URL: &...
2013 Aug 13
2
[LLVMdev] SimplifyLibCalls doesn't check TLI for LibFunc availability
...t(bool UnsafeFPShrink) : UnsafeFPLibCallOptimization(UnsafeFPShrink) {} virtual Value *callOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { Value *Ret = NULL; if (UnsafeFPShrink && Callee->getName() == "pow" && TLI->has(LibFunc::powf)) { UnaryDoubleFPOpt UnsafeUnaryDoubleFP(true); Ret = UnsafeUnaryDoubleFP.callOptimizer(Callee, CI, B); } [...] if (Op2C->isExactlyValue(0.5)) { // Expand pow(x, 0.5) to (x == -infinity ? +infinity : fabs(sqrt(x))). // This is faster than calling pow, and still...
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
...should *not* be implemented via log( ) and exp( ), and indeed, most math libraries don’t do that. >> >> Just to provide some example data, for single-precision x in [1,2) on current OS X: >> >> The worst-case error of x*x*x is 1.28736 ulp >> The worst-case error of powf(x, 3) is 0.500013 ulp >> >> The RMS error of x*x*x is 0.585066 ulp >> The RMS error of powf(x,3) is 0.499984 ulp > > … or maybe not! :) > > I’m not sure what to think of these results. For instance what’s the perf impact of calling into powf(x, 3) on OSX vs using...
2020 Oct 28
4
Targeting old glibc
Hi, I wonder what is the right way to target an old glibc? I have a machine which is up to date (glibc 2.32 and clang+lld 10.0.1). So far I've been able to target older glibc by having a C file containing: __asm__(".symver powf,powf at GLIBC_2.2.5"); __asm__(".symver expf,expf at GLIBC_2.2.5"); __asm__(".symver exp2f,exp2f at GLIBC_2.2.5"); __asm__(".symver log2f,log2f at GLIBC_2.2.5"); __asm__(".symver logf,logf at GLIBC_2.2.5"); __asm__(".symver log,log at GLIBC_2.2.5&q...
2013 Aug 13
0
[LLVMdev] SimplifyLibCalls doesn't check TLI for LibFunc availability
...Shrink) {}**** > > virtual Value *callOptimizer(Function *Callee, CallInst *CI, IRBuilder<> > &B) {**** > > Value *Ret = NULL;**** > > if (UnsafeFPShrink && Callee->getName() == "pow" &&**** > > TLI->has(LibFunc::powf)) {**** > > UnaryDoubleFPOpt UnsafeUnaryDoubleFP(true);**** > > Ret = UnsafeUnaryDoubleFP.callOptimizer(Callee, CI, B);**** > > }**** > > ** ** > > [...]**** > > ** ** > > if (Op2C->isExactlyValue(0.5)) {**** > > // Expand...
2020 Nov 11
2
Targeting old glibc
...xp > or > .symver exp,exp@@@GLIBC_2.2.5 > call exp > > Then the undefined symbol 'exp' will be renamed to 'exp at GLIBC_2.2.5' > and get bound to the old version at link time. It will thus work with > old glibc. I have one .cpp file with: __asm__(".symver powf,powf at GLIBC_2.2.5"); __asm__(".symver expf,expf at GLIBC_2.2.5"); __asm__(".symver exp2f,exp2f at GLIBC_2.2.5"); __asm__(".symver log2f,log2f at GLIBC_2.2.5"); __asm__(".symver logf,logf at GLIBC_2.2.5"); __asm__(".symver log,log at GLIBC_2.2.5&q...
2020 Oct 28
2
Targeting old glibc
...> > >I wonder what is the right way to target an old glibc? > > > >I have a machine which is up to date (glibc 2.32 and clang+lld 10.0.1). > > > >So far I've been able to target older glibc by having a C file containing: > > > >__asm__(".symver powf,powf at GLIBC_2.2.5"); > >__asm__(".symver expf,expf at GLIBC_2.2.5"); > >__asm__(".symver exp2f,exp2f at GLIBC_2.2.5"); > >__asm__(".symver log2f,log2f at GLIBC_2.2.5"); > >__asm__(".symver logf,logf at GLIBC_2.2.5"); > > &...
2012 Jul 15
1
[LLVMdev] Errors reported in config.log on linux
...ing: conflicting types for built-in function 'roundf' conftest.c:138: warning: conflicting types for built-in function 'roundf' conftest.c:140: warning: conflicting types for built-in function 'nearbyintf' conftest.c:142: warning: conflicting types for built-in function 'powf' conftest.c:142: warning: conflicting types for built-in function 'powf' conftest.c:145: warning: conflicting types for built-in function 'round' conftest.c:165: warning: the use of `mktemp' is dangerous, better use `mkstemp' conftest.c:160: warning: conflicting types fo...
2007 Jul 03
0
[LLVMdev] Solaris 9 compilation
...n statement in function returning non-void 4) /home/ggreif/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp: In member function `virtual bool llvm::SimpleRegisterCoalescing::runOnMachineFunction(llvm::MachineFunction&)': /home/ggreif/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp:1095: error: `powf' was not declared in this scope /home/ggreif/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp:1095: warning: unused variable 'powf' Should we #define powf as pow? Better possibly is to differentiate by a configure test. I can come up with a patch. 5) /home/ggreif/llvm/lib/ExecutionEngin...
2020 Nov 11
2
Targeting old glibc
...; > > Then the undefined symbol 'exp' will be renamed to 'exp at GLIBC_2.2.5' > > > and get bound to the old version at link time. It will thus work with > > > old glibc. > > > > I have one .cpp file with: > > > > __asm__(".symver powf,powf at GLIBC_2.2.5"); > > __asm__(".symver expf,expf at GLIBC_2.2.5"); > > __asm__(".symver exp2f,exp2f at GLIBC_2.2.5"); > > __asm__(".symver log2f,log2f at GLIBC_2.2.5"); > > __asm__(".symver logf,logf at GLIBC_2.2.5"); > &g...
2010 Jan 05
1
[LLVMdev] [PATCH] test-suite/bullet: unbreak linking
Eliminate undefined references to powf, sqrtf and friends. Index: MultiSource/Benchmarks/Bullet/Makefile =================================================================== --- MultiSource/Benchmarks/Bullet/Makefile (revision 92512) +++ MultiSource/Benchmarks/Bullet/Makefile (working copy) @@ -1,7 +1,7 @@ LEVEL = ../../../ PROG = bul...
2020 Nov 11
0
Targeting old glibc
....5 > > call exp > > > > Then the undefined symbol 'exp' will be renamed to 'exp at GLIBC_2.2.5' > > and get bound to the old version at link time. It will thus work with > > old glibc. > > I have one .cpp file with: > > __asm__(".symver powf,powf at GLIBC_2.2.5"); > __asm__(".symver expf,expf at GLIBC_2.2.5"); > __asm__(".symver exp2f,exp2f at GLIBC_2.2.5"); > __asm__(".symver log2f,log2f at GLIBC_2.2.5"); > __asm__(".symver logf,logf at GLIBC_2.2.5"); > > __asm__(".sy...
2020 Nov 09
0
Targeting old glibc
...s the right way to target an old glibc? > > > > > >I have a machine which is up to date (glibc 2.32 and clang+lld 10.0.1). > > > > > >So far I've been able to target older glibc by having a C file containing: > > > > > >__asm__(".symver powf,powf at GLIBC_2.2.5"); > > >__asm__(".symver expf,expf at GLIBC_2.2.5"); > > >__asm__(".symver exp2f,exp2f at GLIBC_2.2.5"); > > >__asm__(".symver log2f,log2f at GLIBC_2.2.5"); > > >__asm__(".symver logf,logf at GLIBC_2.2.5...
2020 Nov 11
0
Targeting old glibc
...efined symbol 'exp' will be renamed to 'exp at GLIBC_2.2.5' >> > > and get bound to the old version at link time. It will thus work with >> > > old glibc. >> > >> > I have one .cpp file with: >> > >> > __asm__(".symver powf,powf at GLIBC_2.2.5"); >> > __asm__(".symver expf,expf at GLIBC_2.2.5"); >> > __asm__(".symver exp2f,exp2f at GLIBC_2.2.5"); >> > __asm__(".symver log2f,log2f at GLIBC_2.2.5"); >> > __asm__(".symver logf,logf at GLIBC_2.2.5...
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
> On Jan 12, 2017, at 5:03 AM, Antoine Pitrou via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On Mon, 9 Jan 2017 11:43:17 -0600 > Wei Ding via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> Hi, >> >> I want an efficient way to implement function pow in LLVM instead of >> invoking pow() math built-in. For algorithm part, I am clear for the
2020 Nov 09
2
Targeting old glibc
...ld glibc? > > > > > > > >I have a machine which is up to date (glibc 2.32 and clang+lld 10.0.1). > > > > > > > >So far I've been able to target older glibc by having a C file containing: > > > > > > > >__asm__(".symver powf,powf at GLIBC_2.2.5"); > > > >__asm__(".symver expf,expf at GLIBC_2.2.5"); > > > >__asm__(".symver exp2f,exp2f at GLIBC_2.2.5"); > > > >__asm__(".symver log2f,log2f at GLIBC_2.2.5"); > > > >__asm__(".symver logf...
2020 Nov 10
2
Targeting old glibc
Thank you very much for your help Fāng-ruì Sòng. I've tried various things like linking directly to libm-2.32 but it didn't work, it seems that libm-2.32 still pulls libmvec. I have the following linker flags: CLANG_LDFLAGS="-fuse-ld=lld -static-libstdc++ -static-libgcc -fvisibility=hidden -fdata-sections -ffunction-sections" CLANG_LDFLAGS="$CLANG_LDFLAGS