Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] llvm.powi intrinsic"
2007 Nov 27
0
[LLVMdev] llvm.powi intrinsic
> The purpose of the llvm.powi intrinsic isn't clear to me. Why is
> llvm.powi preferable to multiplication and division for small constant
> powers (e.g., 1/x, x*x, etc.)? Why is it preferable to llvm.pow for
> large variable powers? I'm also curious about the time bound. I'm
> assuming that powi(x,1000000) doesn't do a million multiplications...
> Do any
2009 Jul 26
2
[LLVMdev] question about llvm.powi and reassociation
Hello, all. To get my feet wet and hopefully make a small contribution, I
was looking for something small to start with. I settled on one of the
suggestions from the CodeGen readme:
> Reassociate should turn things like:
>
> int factorial(int X) {
> return X*X*X*X*X*X*X*X;
> }
>
> into llvm.powi calls, allowing the code generator to
> produce balanced multiplication
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
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
2010 Jun 07
0
[LLVMdev] IntrinsicLowering and several related problems
Hi Hao Shen,
> 1. Why I can not get the type of CallInst *CI?
> !CI->getType()->isVoidTy() is not working and how to solve it?
what does "not working" mean? It should work.
> 2. Why Intrinsic::vastart and Intrinsic::powi are excluded from
> IntrinsicLowering function?
> There are no way to lower them at the byte-code level?
For vastart, it probably isn't
2010 Jun 07
2
[LLVMdev] IntrinsicLowering and several related problems
Dear all,
I'm using IntrinsicLowering class to remove all intrinsics in LLVM byte-code.
Unfortunately, I meet several problems:
1. Why I can not get the type of CallInst *CI?
!CI->getType()->isVoidTy() is not working and how to solve it?
This type information has some impacts with intrinsics such as flt_rounds.
2. Why Intrinsic::vastart and Intrinsic::powi are excluded from
2005 Jun 29
6
x*x*x*... vs x^n
Hi
I have been wondering if there one can speed up calculating small powers
of numbers such as x^8 using multiplication.
In addition, one can be a bit clever and calculate x^8 using only 3
multiplies.
look at this:
> f1 <- function(x){x*x*x*x*x*x*x*x}
> f2 <- function(x){x^8}
> f3 <- function(x){x2 <- x*x;x4 <- x2*x2;return(x4*x4)}
[so f1() and f2() and f3() are
2013 Feb 07
5
[LLVMdev] [NVPTX] We need an LLVM CUDA math library, after all
Hi Justin, gentlemen,
I'm afraid I have to escalate this issue at this point. Since it was
discussed for the first time last summer, it was sufficient for us for a
while to have lowering of math calls into intrinsics disabled at DragonEgg
level, and link them against CUDA math functions at LLVM IR level. Now I
can say: this is not sufficient any longer, and we need NVPTX backend to
deal with
2013 Feb 09
0
[LLVMdev] [NVPTX] We need an LLVM CUDA math library, after all
The lack of an open-source vector math library (which is what you suggest
here) prompted me to start a project "vecmathlib", available at <
https://bitbucket.org/eschnett/vecmathlib>. This library provides almost
all math functions available in libm, implemented in a vectorised manner,
i.e. suitable for SSE2/AVX/MIC/PTX etc.
In its current state the library has rough edges, e.g.
2014 Sep 18
2
[LLVMdev] troubles with ISD::FPOWI
Hi,
I'm stumped by how to handle fpowi. Here is the context: my architecture has i64, f32, and f64 registers. No i32. For calls & returns, we promote i32 to i64. There is no support in the architecture to perform fpowi - it has to go through the runtime.
I'm using gfortran + dragonegg + llvm3.4 to generate .ll files via plugin.
The fortran expression
REAL = REAL ** INTEGER*4
2007 Nov 22
0
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
Hi,
> Sure. But now the question is the llvm-gcc will not emit llvm.pow.* anytime.
indeed there seems to be no code in llvm-gcc to do so, though there is code for
raising to an integer power (in llvm-convert). Please feel free to investigate
and add some. Presumably it should turn gcc's BUILT_IN_POW into llvm.pow.*.
That said, as far as I can see the C front-end doesn't generate
2007 Nov 22
2
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
2007/11/22, Duncan Sands <baldrick at free.fr>:
>
> Hi,
>
> > Current llvm-gcc cannot emit llvm intrinsic function like llvm.pow.* and
> > llvm.sin.*
> > For example:
> >
> > double foo(double x, double y) {
> > return pow(x,y);
> > }
> >
> > will compiled into ll:
> >
> > define double @foo(double %x, double %y) {
2013 Feb 08
0
[LLVMdev] [NVPTX] We need an LLVM CUDA math library, after all
Yes, it helps a lot and we are working on it.
A few questions,
1) What will be your use model of this library? Will you run optimization phases after linking with the library? If so, what are they?
2) Do you care if the names of functions differ from those in libm? For example, it would be gpusin() instead of sin().
3) Do you need a different library for different host
2013 Feb 17
2
[LLVMdev] [NVPTX] We need an LLVM CUDA math library, after all
Dear Yuan,
Sorry for delay with reply,
Answers on your questions could be different, depending on the math library
placement in the code generation pipeline. At KernelGen, we currently have
a user-level CUDA math module, adopted from cicc internals [1]. It is
intended to be linked with the user LLVM IR module, right before proceeding
with the final optimization and backend. Last few months we
2006 Oct 27
3
Power of test
What would be the R formulae for a two-sided test?
I have a formula for a one-sided test:
powertest <- function(a,m0,m1,n,s){
t1 = -qnorm(1-a)
num = abs(m0-m1) * sqrt(n)
t2 = num/s
pow = pnorm(t1 + t2)
}
Would you pls let me know if you know of?
Thank you,
ej
2011 Nov 17
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On 11/17/2011 12:38 AM, Hal Finkel wrote:
> Tobias, et al.,
>
> Attached is the my autovectorization pass.
Very nice. Will you be at the developer summit? Maybe we could discuss
the integration there?
Here a first review of the source code.
> diff --git a/docs/Passes.html b/docs/Passes.html
> index 5c42f3f..076effa 100644
> --- a/docs/Passes.html
> +++ b/docs/Passes.html
2015 Jan 31
2
[LLVMdev] debug info for llvm::IntrinsicInst ???
When trying to display and do anything with a variable of type
IntrinsicInst, gdb thinks that it's an incomplete
type and kind find any member functions or even display the class.
(gdb) list 1337
1332
1333 // Finish off the call including any return values.
1334 return finishCall(CLI, RetVT, NumBytes);
1335 }
1336
1337 bool MipsFastISel::fastLowerIntrinsicCall(const
2013 Feb 17
2
[LLVMdev] [NVPTX] We need an LLVM CUDA math library, after all
Hi Justin,
I don't understand, why, for instance, X86 backend handles pow
automatically, and NVPTX should be a PITA requiring user to bring his own
pow implementation. Even at a very general level, this limits the interest
of users to LLVM NVPTX backend. Could you please elaborate on the rationale
behind your point? Why the accuracy modes I suggested are not sufficient,
in your opinion?
- D.
2013 Feb 17
0
[LLVMdev] [NVPTX] We need an LLVM CUDA math library, after all
I would be very hesitant to expose all math library functions as
intrinsics. I believe linking with a target-specific math library is the
correct approach, as it decouples the back end from the needs of the source
program/language. Users should be free to use any math library
implementation they choose. Intrinsics are meant for functions that
compile down to specific isa features, like fused
2013 Feb 17
0
[LLVMdev] [NVPTX] We need an LLVM CUDA math library, after all
The X86 back-end just calls into libm:
// Always use a library call for pow.
setOperationAction(ISD::FPOW , MVT::f32 , Expand);
setOperationAction(ISD::FPOW , MVT::f64 , Expand);
setOperationAction(ISD::FPOW , MVT::f80 , Expand);
The issue is really that there is no standard math library for PTX. I
agree that this is a pain for most users, but I