Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] 64-bit Attributes?"
2012 Jan 10
0
[LLVMdev] 64-bit Attributes?
Hi Kostya,
> Today, llvm/Attributes.h defines 'Attributes' as 'unsigned'.
> This bit vector is fully packed, and I am probably not the only one who wants to
> add bits to it.
> Is there a strong reason not to define Attributes as uint64_t?
> At first glance this seems doable, and the IR reader/writer will not need to be
> changed at all (or at least, not
2012 Feb 07
5
[LLVMdev] Static ctors in llvm::Attribute
Hi Kostya,
One unexpected piece of fallout in your recent attributes change (r148553) was that it introduced a bunch of static constructors into .o files that #include Attributes.h, due to stuff like this:
const Attributes None (0); ///< No attributes have been set
const Attributes ZExt (1<<0); ///< Zero extended before/after call
const Attributes SExt
2012 Feb 07
0
[LLVMdev] Static ctors in llvm::Attribute
I see the problem.
Let me try to come up with a solution that does not involve constructors
but also does not sacrifice type safety.
On Tue, Feb 7, 2012 at 12:01 PM, Chris Lattner <clattner at apple.com> wrote:
> Hi Kostya,
>
> One unexpected piece of fallout in your recent attributes change (r148553)
> was that it introduced a bunch of static constructors into .o files that
2016 Oct 20
2
RFC: Killing undef and spreading poison
Hi Alexandre,
On Wed, Oct 19, 2016 at 6:27 PM, Alexandre Isoard
<alexandre.isoard at gmail.com> wrote:
> Really interesting read. I am perplexed now, and am not even sure what is
> the meaning of undef anymore.
Welcome aboard. :)
> Example (unrelated to your blog post, but still weird):
> %x = sext i1 undef to i2
>
> I understand that I can replace it by either of:
>
2019 Sep 27
2
Shift-by-signext - sext is bad for analysis - ignore it's use count?
In https://reviews.llvm.org/D68103 the InstCombine learned that shift-by-sext
is simply a shift-by-zext. But the transform is limited to single-use sext.
We can quite trivially get a case where there are two shifts by the same sext:
https://godbolt.org/z/j6mO3t <- We should handle those cases.
In https://reviews.llvm.org/D68103#1686130 Sanjay Patel notes that this
sext is intrusive for
2016 Sep 28
4
IR canonicalization: select or bool math?
I have another round of questions about IR select canonicalizations. For
the purity of this quiz, please disregard prior knowledge of how this is
handled by instcombine or how this is lowered by your favorite target...of
course we'll fix it. :) Some answers in the links below if you do want to
know.
Which, if any, of these is canonical?
1. Is a zext simpler than a select?
a. define i32
2019 Oct 01
2
Shift-by-signext - sext is bad for analysis - ignore it's use count?
Thanks for taking a look!
On Tue, Oct 1, 2019 at 9:09 PM Philip Reames <listmail at philipreames.com> wrote:
> On 9/27/19 1:40 PM, Roman Lebedev via llvm-dev wrote:
> > In https://reviews.llvm.org/D68103 the InstCombine learned that shift-by-sext
> > is simply a shift-by-zext.
>
> Just to make sure I'm following, the reasoning here is that the shift
> amount must
2015 Apr 29
2
[LLVMdev] [LoopVectorizer] Missed vectorization opportunities caused by sext/zext operations
Hi,
This is somewhat similar to the previous thread regarding missed vectorization
opportunities (http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-April/084765.html),
but maybe different enough to require a new thread.
I'm seeing some missed vectorization opportunities in the loop vectorizer because SCEV
is not able to fold sext/zext expressions into recurrence expressions (AddRecExpr).
This
2019 Oct 01
2
Shift-by-signext - sext is bad for analysis - ignore it's use count?
The thing is, we *don't* "not demand" those high bits.
We *don't* not care what's in those bits - IR shifts don't mask their
shift amounts.
I.e we can't replace `x >> (32-y)` with `x >> (-y)`,
which would be legal transform should we not demand those bits.
We very much demand them. We just know those bits to be zero.
And i'm not sure how to convey
2019 Oct 07
2
Shift-by-signext - sext is bad for analysis - ignore it's use count?
On Mon, Oct 7, 2019 at 11:32 AM Roman Lebedev <lebedev.ri at gmail.com> wrote:
>
> Bump. Any further thoughts here?
>
> To recap - i don't really see how this can be a demandedbits problem - we do
> demand all those bits, we just know they must be zero.
> (i would love to be proven wrong though!)
>
> Roman.
>
> On Tue, Oct 1, 2019 at 11:17 PM Roman Lebedev
2015 May 06
2
[LLVMdev] [LoopVectorizer] Missed vectorization opportunities caused by sext/zext operations
For
void test0(unsigned short a, unsigned short * in, unsigned short * out) {
for (unsigned short w = 1; w < a - 1; w++) //this will never overflow
out[w] = in[w+7] * 2;
}
I think it will be sufficient to add a couple of new cases to
ScalarEvolution::HowManyLessThans --
zext(A) ult zext(B) == A ult B
sext(A) slt sext(B) == A slt B
Currently it bails out if it sees a non-add
2009 Nov 13
7
[LLVMdev] Proposal: intp type
On Nov 12, 2009, at 7:35 PM, Talin wrote:
> On Thu, Nov 12, 2009 at 5:58 PM, Chris Lattner <clattner at apple.com>
> wrote:
>
> There is also the issue of how constants should be represented.
>
> For all current processors that I know of, an intptr will be either
> 32 or 64 bits. However, there may be some future processor which
> supports 128-bit pointers
2009 Nov 13
0
[LLVMdev] Proposal: intp type
Chris Lattner wrote:
> On Nov 12, 2009, at 7:35 PM, Talin wrote:
>> On Thu, Nov 12, 2009 at 5:58 PM, Chris Lattner <clattner at apple.com
>> <mailto:clattner at apple.com>> wrote:
>>
>>
>> There is also the issue of how constants should be represented.
>>
>> For all current processors that I know of, an intptr will be either
>> 32 or
2016 Oct 20
2
RFC: Killing undef and spreading poison
Hi Mehdi,
On Wed, Oct 19, 2016 at 8:29 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>> sext(x):
>> t = zext x
>> result = 0
>> for i = 0 to bitwidth:
>> result |= t << i;
>> return result
>
> I don’t understand this definition of sext?
> Are you trying to express that we will copy the sign one bit at a time, and so every `new`
2008 Oct 06
3
[LLVMdev] sext..to instruction
Hi,
I have a question about the "sext..to" instruction. In the document, I found
two examples:
%x = sext i8 -1 to i16
It means:
i8 -1 = 1111 1111 --> 1111 1111 1111 1111 = i16
how can it determinate, that the i16 value %x positive is (65535)?
And the second example:
%y = sext i1 true to i32
1 --> 1111 1111 1111 1111 1111 1111 1111 1111
In this example, %y is -1
I'm not sure
2009 Nov 13
2
[LLVMdev] Proposal: intp type
On Nov 12, 2009, at 11:29 PM, John McCall wrote:
>> sext/zext/trunc are very nice for the optimizer, we should keep
>> them. It means that the optimizer doesn't have to check that the
>> input to a sext is bigger or smaller than the result, for example.
>> Code that cares (e.g. instcombine) really likes this.
>
> We could just say that code has undefined
2015 Aug 18
2
RFC for a design change in LoopStrengthReduce / ScalarEvolution
> Of course, and the point is that, for example, on x86_64, the zext here is free. I'm still trying to understand the problem...
>
> In the example you provided in your previous e-mail, we choose the solution:
>
> `GEP @Global, zext(V)` -> `GEP (@Global + zext VStart), {i64 0,+,1}`
> `V` -> `trunc({i64 0,+,1}) + VStart`
>
> instead of the actually-better
2015 Apr 18
2
[LLVMdev] Does LLVM optimize rudimentary i16 -> i32 conversions
In my language there are a lot of i16 definitions, but almost all of the
time they are upgraded to i32 because my add operations only happen on i32.
So to be representative to my language definition, I have a lots of
Sext/Zext and Truncs pretty much every time I add or subtract.
As soon as I pass through InstCombine things look much nicer, all the
upcasts and downcasts go away, but my test cases
2016 Apr 23
2
[IndVarSimplify] Narrow IV's are not eliminated resulting in inefficient code
Hi Sanjoy,
Thank you for looking into this!
Yes, your patch does fix my larger test case too. My algorithm gets double
performance improvement with the patch, as the loop now has a smaller
instruction set and succeeds to unroll w/o any extra #pragma's.
I also ran the LLVM tests against the patch. There are 6 new failures:
Analysis/LoopAccessAnalysis/number-of-memchecks.ll
2017 Jul 01
8
[IR canonicalization] 6 ways to choose {-1,0,1}
I'm looking at the output of memcmp() expansion (D34904), and I noticed
that there are many ways to produce the common positive/zero/negative
comparison result in IR.
For the following 6 functionally equivalent C source functions, we produce
6 different versions of IR which leads to 6 different asm outputs for x86.
Which of these should we choose as canonical IR form?
1. Two selects
int