Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] question about Type::canLoslesslyBitCastTo"
2012 Jul 10
2
[LLVMdev] question about Type::canLoslesslyBitCastTo
Hi Akira,
> This is the definition of BITCAST in include/llvm/CodeGen/ISDOpcodes.h:
>
> // BITCAST - This operator converts between integer, vector and FP
> // values, as if the value was stored to memory with one type and loaded
> // from the same address with the other type (or equivalently for vector
> // format conversions, etc). The source and result are required to have
2012 Jul 10
0
[LLVMdev] question about Type::canLoslesslyBitCastTo
This is the definition of BITCAST in include/llvm/CodeGen/ISDOpcodes.h:
// BITCAST - This operator converts between integer, vector and FP
// values, as if the value was stored to memory with one type and loaded
// from the same address with the other type (or equivalently for vector
// format conversions, etc). The source and result are required to have
// the same bit size (e.g. f32 <->
2012 Jul 16
0
[LLVMdev] question about Type::canLoslesslyBitCastTo
Hi Duncan and llvm developers,
The attached patch makes the function return true if the conversion is
between a vector and an integer of the same size.
Please review when you have time.
On Tue, Jul 10, 2012 at 12:21 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Akira,
>
> > This is the definition of BITCAST in include/llvm/CodeGen/ISDOpcodes.h:
> >
> > //
2012 Jun 19
2
[LLVMdev] How to define macros in a tablegen file?
Hi,
I was wondering if there is a way to specify macros to help shorten
rewriting patterns like these:
def : Pat <(v4i8 (mul (v4i8 IntRegs:$a), (v4i8 IntRegs:$b))),
(v4i8
(VTRUNEHB
(v4i16
(VTRUNEWH
(v2i32
(VMPYH
(v2i16
(EXTRACT_SUBREG (v4i16 (VSXTBH (v4i8 IntRegs:$a))), subreg_hireg)),
(v2i16
(EXTRACT_SUBREG (v4i16 (VSXTBH (v4i8
2018 Apr 09
1
llvm-dev Digest, Vol 166, Issue 22
Hi Krzysztof,
Sure, please see below. DAG.dump.() before and after, annotated with what I
believe the DAG means.
I've spent some time debugging the method but it's proving difficult to
determine where the logic is misfiring. Disabling the entire combine causes
a lot of failing x86-64 tests - I may have to learn an upstream vector ISA
to make progress on this.
Thank you
>From your
2012 Jul 30
2
[LLVMdev] Vector promotion broken for <2 x [i8|i16]>
v4i8 itself is a legal type, just not on the 'AND' operation.
So there seems to be multiple problems here.
1) PromoteVectorOp doesn't handle the case where the types are not the same size, this occurs because #2
2) getTypeToPromoteTo doesn't actual check to see if the type it should promote to makes any sense.
3) PromoteVectorOp also doesn't handle the case where
2012 Jul 30
2
[LLVMdev] Vector promotion broken for <2 x [i8|i16]>
Hrmm.... PromoteVectorOp doesn't seem to follow this at all.
http://llvm.org/svn/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
SDValue VectorLegalizer::PromoteVectorOp(SDValue Op) {
// Vector "promotion" is basically just bitcasting and doing the operation
// in a different type. For example, x86 promotes ISD::AND on v2i32 to
// v1i64.
EVT VT =
2012 Jul 30
0
[LLVMdev] Vector promotion broken for <2 x [i8|i16]>
If v4i8 is a legal type then getTypeToPromoteTo should return the pair v4i8 and 'legal'. This looks like the root of the problem.
-----Original Message-----
From: Villmow, Micah [mailto:Micah.Villmow at amd.com]
Sent: Monday, July 30, 2012 22:10
To: Rotem, Nadav; Developers Mailing List
Subject: RE: Vector promotion broken for <2 x [i8|i16]>
v4i8 itself is a legal type, just not
2016 Jan 29
2
New register class and patterns
I've added a new register class to my target, but haven't used any of the
new registers in any of the instructions. However when I compile llvm I get
the following error:
In SFEQ_ri: Could not infer all types in pattern
Curiously all the instructions where this error occurs are the set flag
instructions (flags like zero, less than, greater than etc).
Would anyone be able to figure out
2012 Jul 30
0
[LLVMdev] Vector promotion broken for <2 x [i8|i16]>
Notice that PromoteVectorOp is called after the type legalization legalized all of the types in the program. It legalizes the *operations*, not the types. So, you should only see legal types (Legal types are types that fit into your registers). So, if your target has v2i32, I suspect that v4i8 is an illegal because it has a different size.
-----Original Message-----
From: Villmow, Micah
2012 Jun 19
0
[LLVMdev] How to define macros in a tablegen file?
If the patterns only include SDNodes, then pattern fragments will work.
I might be wrong, but I've yet to find a way to do it with machine instructions, which is what you seem to have here.
Micah
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Sebastian Pop
> Sent: Tuesday, June 19, 2012 3:39 PM
> To:
2015 Jul 01
2
[LLVMdev] Match immediate value in tablegen
I was trying to do a pattern matching for a rd+imm instruction in my own
backend.
It looks something like:
def: Pat<build_vector v2i16:$src1, v2i16:$src2, (OR (SLLI GPR: $src1,16),
GPR:$src2>;
OR takes two i32 in registers and SLLI takes one i32 in registers and an
immediate.
But the immediate '16' does not work here and I tried different ways. May I
know if any of you have any idea
2012 Feb 21
5
[LLVMdev] buildbot failure in LLVM on clang-x86_64-debian-fnt
All,
This buildbot is getting lots of assertion failures in the test suite.
They were probably caused by my commit:
------------------------------------------------------------------------
r151049 | foad | 2012-02-21 09:25:52 +0000 (Tue, 21 Feb 2012) | 6 lines
Changed paths:
M /llvm/trunk/lib/VMCore/LLVMContextImpl.h
M /llvm/trunk/lib/VMCore/Type.cpp
PR1210: make uniquing of struct and
2012 Jan 10
1
[LLVMdev] Minimum addressable unit
Hi,
How can we set the minimum addressable memory unit to be 32 bit ?
As far as I know, getTargetData() provides all type sizes and alignments
to compute address offsets assuming a MAU of 8 bits.
But what if I have a MAU of 32 bits ?
Currently I have 2 legal types in my BE, i16 and v2i16, and I could set
TargetData in order to have v2i16 types with a size and alignment of 8
bits. Doing so, I
2011 Dec 10
0
[LLVMdev] Types inference in tblgen: Multiple exceptions
On Fri, Dec 9, 2011 at 4:12 PM, Ivan Llopard <ivanllopard at gmail.com> wrote:
> Hi Eli,
> Thanks for your response. Please see my responses below.
>
>
> On 10/12/2011 00:28, Eli Friedman wrote:
>>
>> On Fri, Dec 9, 2011 at 4:46 AM, Llopard Ivan<ivanllopard at gmail.com>
>> wrote:
>>>
>>> Hi all,
>>>
>>> I am writing
2011 Dec 10
1
[LLVMdev] Types inference in tblgen: Multiple exceptions
On 10/12/2011 01:32, Eli Friedman wrote:
> On Fri, Dec 9, 2011 at 4:12 PM, Ivan Llopard<ivanllopard at gmail.com> wrote:
>> Hi Eli,
>> Thanks for your response. Please see my responses below.
>>
>>
>> On 10/12/2011 00:28, Eli Friedman wrote:
>>> On Fri, Dec 9, 2011 at 4:46 AM, Llopard Ivan<ivanllopard at gmail.com>
>>> wrote:
2012 Jul 30
0
[LLVMdev] Vector promotion broken for <2 x [i8|i16]>
I don't know how your target architecture looks like, but I suspect that <4 x i8> should not be legalized to <1 x i32>. I think that what you are seeing is that <4 x i8> is first split into <2 x i8>, and later promoted to <2 x i32>. At the moment different targets can only affect type-legalization by declaring different legal types. A number of us discussed the
2011 Dec 09
2
[LLVMdev] Types inference in tblgen: Multiple exceptions
Hi all,
I am writing a back-end for a processor that has complex type registers.
It has two functional units to perform complex multiplications.
From clang, I emulate a complex multiplication using vectors and, at
the IR, I got this tblgen-friendly pattern (real component) :
(set RARegs:$dst, (insertelt RARegs:$src,
(i16 (trunc (add
(ncmul
(sext (i16
2011 Dec 10
5
[LLVMdev] Types inference in tblgen: Multiple exceptions
Hi Eli,
Thanks for your response. Please see my responses below.
On 10/12/2011 00:28, Eli Friedman wrote:
> On Fri, Dec 9, 2011 at 4:46 AM, Llopard Ivan<ivanllopard at gmail.com> wrote:
>> Hi all,
>>
>> I am writing a back-end for a processor that has complex type registers.
>> It has two functional units to perform complex multiplications.
>> From clang,
2011 Dec 09
0
[LLVMdev] Types inference in tblgen: Multiple exceptions
On Fri, Dec 9, 2011 at 4:46 AM, Llopard Ivan <ivanllopard at gmail.com> wrote:
> Hi all,
>
> I am writing a back-end for a processor that has complex type registers.
> It has two functional units to perform complex multiplications.
> From clang, I emulate a complex multiplication using vectors and, at
> the IR, I got this tblgen-friendly pattern (real component) :
>