Displaying 20 results from an estimated 177 matches for "binaryoperation".
2008 Jul 01
2
[LLVMdev] vmkit on x86_64
Hello,
I'm trying to compile vmkit on a x86_64 linux box with gcc-4.1.2, but
I'm running into troubles because of various problems with casts
between pointers and integers. Is there anybody who succeeded in this
task? Az I see, some of the problems can be fixed with an appropriate
typedef/macro declaration, but in VMCore/JavaObject.cpp some lowlevel
bitmanipulation is used, to mark
2008 Jul 01
0
[LLVMdev] vmkit on x86_64
Hi Zsombor,
Thanks for the patch! Unfortunately I can't apply it because the llvm
API has moved from BinaryOperator::create to BinaryOperator::Create. Are
you using svn head?
Now on the x86_64 part. There has been very little work on porting vmkit
on x86_64. If you're having compilation problems, I suppose it's in the
garbage collector directory (GCMmap2). If you could make the
2012 Jul 31
0
[LLVMdev] rotate
Oh, no. I should have been more clear. The patch was not rejected, just
lost in the daily shuffle.
I already have my employer's approval to send this upstream, so I will
prepare a patch against trunk this morning.
> I proposed a similar patch to LLVM (left circular shift) around 10/2011.
> > Parts of my patch did make it into trunk about a year after, but others
> > did not.
2012 Jul 31
4
[LLVMdev] rotate
On Monday, July 30, 2012 12:16 AM, Cameron McInally wrote:
> Hey Andy,
>
> I proposed a similar patch to LLVM (left circular shift) around 10/2011.
> Parts of my patch did make it into trunk about a year after, but others
> did not.
>
> At that time, my solution was to add a binary operator to the IRBuilder,
> since LCS fits in nicely with the other shift operators. But,
2012 Jul 31
3
[LLVMdev] rotate
Andy,
Here is the left circular shift operator patch. I apologize to the reviewer
in advance. The patch has a good bit of fine detail. Any
comments/criticisms?
Some caveats...
1) This is just the bare minimum needed to make the left circular shift
operator work (e.g. no instruction combining).
2) I tried my best to select operator names in the existing style; please
feel free to change them as
2014 Jun 25
2
[LLVMdev] Question Regarding Sign-Overflow
Sorry, the old title didn't make sense.
> Hi,
>
> I have doubts on the following transformation in InstCombineAddSub.cpp. Is
> it always safe to preserve NSW/NUW in this case?
>
> // If this is a 'B = x-(-A)', change to B = x+A. This preserves NSW/NUW. if (Value
2017 Sep 13
2
How to add optimizations to InstCombine correctly?
Hi,
I am working on PR34474 and try to add a new optimization to
InstCombine. Like in other parts of the visitMul function I add a Shl
through the IR builder and create a new BinaryOp which I return from
visitMul. If I understand correctly the new BinaryOp returned from
visitMul should replace the original Instruction in the Worklist.
However, I end up in an infinite loop and the Instruction
2008 May 08
0
[LLVMdev] Vector code
Hi Matthijs,
Yes, I've turned off the link-time optimizations (otherwise it just
propagates my constant vectors and immediate prints the result). :-)
Here's essentially what I try to generate:
void add(float z[4], float x[4], float y[4])
{
z[0] = x[0] + y[0];
z[1] = x[1] + y[1];
z[2] = x[2] + y[2];
z[3] = x[3] + y[3];
}
And here's part of the output from the online
2017 Sep 13
3
How to add optimizations to InstCombine correctly?
There is in fact a transform out there somewhere that reverses yours.
define i64 @foo(i64 %a) {
%b = shl i64 %a, 5
%c = add i64 %b, %a
ret i64 %c
}
becomes
define i64 @foo(i64 %a) {
%c = mul i64 %a, 33
ret i64 %c
}
~Craig
On Wed, Sep 13, 2017 at 10:11 AM, Craig Topper <craig.topper at gmail.com>
wrote:
> Your code seems fine. InstCombine can infinite loop if some other
2011 Aug 26
1
[LLVMdev] Why BinaryOperator::Create requires same argument types for shifts?
On 08/26/2011 05:32, Stephan Falke wrote:
> As stated in LLVM's language reference manual
> (http://llvm.org/docs/LangRef.html#i_shl), both arguments for a shl need
> to have the same type.
In my case, original types were uint8 (value) and uint32 (shift)
llvm lacks unsigned types which made it S1=i8 and S2=i32. It's
technically nothing wrong with such combination, and code works
2011 Nov 03
1
[LLVMdev] Why there is no unary operator in LLVM?
Hi llvmdev,
I've noticed that there is no unary operator in LLVM. For unary operator
such as Neg or Or operator, the IR builder just creates a binary operation
with one dummy operand,
01823 <http://llvm.org/doxygen/classllvm_1_1BinaryOperator.html#a073c092ce74a122e898e435e60e84599>
BinaryOperator <http://llvm.org/doxygen/classllvm_1_1BinaryOperator.html>
2005 Jan 27
1
[LLVMdev] Question about inserting IR code
Hi,
From the file HowToUseJIT.cpp, I learned how to insert some calcuation IR code like Add/Sub/Mul etc by using
Instruction *Add = BinaryOperator::createAdd(One, ArgX, "addresult", BB);
By following this way, it works well when I insert some IR code whose operand is integer type like IntTy, however, when I tried to insert similar thing whose operands are float point, I got the
2015 Apr 11
2
[LLVMdev] How doesn't llvm generate IR for logical negate operation
How can I generate LLVM IR for both logical NEG (!)? For example, if I have
Int32Ty a,
For the bitwise NEG(~):
c = ~a ;
I can use the following API from LLVM:
BinaryOperator *neg = BinaryOperator::CreateNeg(nbits, "bitwiseNEG",
insertBefore);
How, if I want to generate logical NEG:
c = !a;
what should I do for this?
Thanks
-------------- next part --------------
An HTML
2008 May 08
2
[LLVMdev] Vector code
llvm does not automatically vectorize your scalar code (as least for
now). You have to write gcc generic vector code or use vector builtins.
Evan
On May 8, 2008, at 1:46 PM, Nicolas Capens wrote:
> Hi Matthijs,
>
> Yes, I've turned off the link-time optimizations (otherwise it just
> propagates my constant vectors and immediate prints the result). :-)
>
> Here's
2008 May 08
3
[LLVMdev] Vector code
Hi Nicolas (at least, I suspect your signing of your mail with "Anton" was not
intentional :-p),
> I assume that's the same as the online demo's "Show LLVM C++ API code"
> option (http://llvm.org/demo/)? I've tried that with a structure containing
> four floating-point components but it also appears to add them individually
> using extract/insert. Maybe
2017 Sep 14
3
How to add optimizations to InstCombine correctly?
Hi Craig,
thanks for digging into this. So InstCombine is the wrong place for
fixing PR34474. Can you give me a hint where such an optimization should
go into CodeGen? I am not really familiar with stuff that happens after
the MidLevel.
Cheers,
Michael
Am 13.09.2017 um 19:21 schrieb Craig Topper:
> And that is less instructions. So from InstCombine's perspective the
> multiply is
2018 Sep 26
2
[FPEnv] FNEG instruction
On Tue, Sep 25, 2018 at 7:37 PM Sanjay Patel <spatel at rotateright.com> wrote:
>
>
> On Tue, Sep 25, 2018 at 2:28 PM Cameron McInally <cameron.mcinally at nyu.edu>
> wrote:
>
>> On Tue, Sep 25, 2018 at 1:39 PM Sanjay Patel <spatel at rotateright.com>
>> wrote:
>>
>>> I have 1 concern about adding an explicit fneg op to IR:
>>>
2011 Aug 26
2
[LLVMdev] Why BinaryOperator::Create requires same argument types for shifts?
I get an assert @ Instructions.cpp:1774 when Op=llvm::Instruction::Shl.
Should this assert avoid shift operations?
Yuri
2011 Aug 26
0
[LLVMdev] Why BinaryOperator::Create requires same argument types for shifts?
Hi Yuri,
As stated in LLVM's language reference manual
(http://llvm.org/docs/LangRef.html#i_shl), both arguments for a shl need
to have the same type.
What exactly are you trying to do?
--Stephan
> I get an assert @ Instructions.cpp:1774 when Op=llvm::Instruction::Shl.
> Should this assert avoid shift operations?
>
> Yuri
2012 Apr 12
0
[LLVMdev] detection of constant diagonal matrix * vector
Hi!
currently instcombine does not detect constant diagonal matrix times vector,
for example
a.xx * [2 0] + a.yy * [0 3]
can be optimized to
a * [2 3]
I have implemented this for float. I know that this assumes x * 0 = 0
which is not
ieee compliant but i post it here in case it is interesting for someone.
on my wish list
there is still an option for target independent optimizations to have x