Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] RFC: optimizing integer overflow checks"
2009 Jun 01
3
[LLVMdev] [PATH] Fix support for .umul.with.overflow on x86 + fix c binding
Hi,
The first patch fixes the implementation of umul.with.overflow on x86
which was throwing a 'Cannot yet select' error.
The second patch fixes the definition of LLVMTypeKind in the C binding by
syncing it with the c++ counterpart.
Please review and commit if it looks ok.
thanks
Zoltan
-------------- next part --------------
An HTML attachment was
2015 Sep 09
2
Writing built-ins for instructions returning multiple operands
I have written many builtins for our SHAVE processor which bind directly to
our instructions, and making instructions that are not easily selectable by
the compiler available to the programmer.
The majority of these are straight-forward enough, taking a small number pf
input operands and returning a single result; for example 'int
__builtin_shave_mul(int, int)' might map onto a simple
2009 Jun 01
0
[LLVMdev] [PATH] Fix support for .umul.with.overflow on x86 + fix c binding
Hi,
Forgot the patch...
Zoltan
On Mon, Jun 1, 2009 at 10:57 PM, Zoltan Varga <vargaz at gmail.com> wrote:
> Hi,
>
> The first patch fixes the implementation of umul.with.overflow on x86
> which was throwing a 'Cannot yet select' error.
> The second patch fixes the definition of LLVMTypeKind in the C binding by
> syncing it with the c++
2015 Mar 26
4
[LLVMdev] `llvm.$op.with.overflow`, InstCombine and ScalarEvolution
I've run into cases where, because not all of LLVM's optimizations
understand the semantics of the `llvm.$op.with.overflow` intrinsics,
canonicalizing compares to `llvm.$op.with.overflow` ends up preventing
optimization.
For instance, running the following snippet through `opt -indvars`
optimizes `%to.optimize` to `true`, but running it through
`opt -instcombine -indvars` does not.
```
2016 May 09
2
x.with.overflow semantics question
CGP also relies on the add being a simple two's complement add, since it will transform
define void @test1(i64 %a, i64 %b, i64* %res_i64, i1* %res_i1) {
entry:
%add = add i64 %b, %a
%cmp = icmp ult i64 %add, %a
store i1 %cmp, i1* %res_i1
store i64 %add, i64* %res_i64
ret void
}
to
define void @test1(i64 %a, i64 %b, i64* %res_i64, i1* %res_i1) {
entry:
%uadd.overflow = call
2013 Mar 30
2
[LLVMdev] Missed optimisation opportunities?
I'm writing a front end for an existing interpreted language with slightly
odd semantics for primitive values.
Similar to the values in a database table, any value could be null, even
for non-pointer types.
For example a boolean variable could be true, false, or null.
To model this behaviour, I'm passing an {i1, [type]} around for every
numeric type. And using insertvalue / extractvalue
2011 Dec 14
2
[LLVMdev] extractvalue and insertvalue on vector types
Hi,
I'm working with some hand-written LLVM IR which llvm-as doesn't like,
giving me the error "Invalid indices for extractvalue". However, as
far as I can tell, the code is valid according to the Language
Reference Manual.
A cut-down example of the kind of code in question is:
%struct.s = type {i32,i32,<2 x i32>}
define void @entry(i32* %out)
{
%1 = extractvalue
2009 Feb 19
1
[LLVMdev] Improving performance with optimization passes
>
> On Thursday 19 February 2009 19:00:14 Jon Harrop wrote:
>> I'm toying with benchmarks on my HLVM and am unable to get any
>> performance
>> improvement from optimization passes...
>
> I just disassembled some of the IR before and after optimization.
> This example
> function squares a complex number:
Something is definitely wrong with the way
2012 Dec 30
2
[LLVMdev] alignment issue, getting corrupt double values
I'm having an issue where a certain set of types and insert/extractvalue
are producing the incorrect values. It appears as though extractvalue
getting my sub-structure is not getting the correct data.
I have these types:
%outer = type { i32, %inner, i1 }
%inner = type { double, i32 }
The trouble is that when I have a value of type %outer then proceed to
extract the components of the
2020 Apr 12
2
Optimization generate super long function definition
Hi all,
sorry to have sent the same question around. I am quite desperately looking for a solution to this problem and I figured the mailing list is the best bet.
In my code, I generate the following function:
define i32 @gl.qi([500 x i32] %x, i32 %i) {
entry:
%x. = alloca [500 x i32]
%i. = alloca i32
%0 = alloca [500 x i32]
store [500 x i32] %x, [500 x i32]* %x.
store i32 %i, i32*
2011 Dec 14
0
[LLVMdev] extractvalue and insertvalue on vector types
Hi Andrew,
> If I change the code such that the structure is defined with a
> 2-element array instead of a 2-element vector:
> %struct.s = type {i32,i32,[2 x i32]}
> then llvm-as does not report an error, hence why I believe the problem
> is specific to accessing vector components.
correct, extractvalue doesn't work on vectors, you need to use to use
extractelement for
2010 Jul 13
1
[LLVMdev] const indices of extractvalue
Hi,
The 'extractvalue' and 'insertvalue' instructions only allow constant
indices. If I have an array with variable indices, I need to store
it into memory, and then load its sub-elements via GEP. Why could
'extractvalue' not support variable indices like GEP? In general, in
which case should source code be translated into 'extractvalue' , and
when should
2010 May 19
2
[LLVMdev] Intrinsics and dead instruction/code elimination
Hi all,
I'm interested in the impact of representing code via intrinsic functions, in contrast to via an instruction, when it comes to performing dead instruction/code elimination. As a concrete example, lets consider the simple case of the llvm.*.with.overflow.* intrinsics.
If I have some sequence (> 1) of llvm.*.with.overflow.* intrinsics, as in the form of:
@global = global i32 0
2016 Feb 22
2
Dealing with opencl kernel parameters in nouveau now that RES support is gone
Hi,
On 22-02-16 13:41, Samuel Pitoiset wrote:
> Hi there,
>
> On 02/22/2016 12:26 PM, Hans de Goede wrote:
<snip>
>> So back to the problem of getting OpenCL(ish) code to work again with
>> the recent mesa changes. For starters I would like to get:
>>
>> src/gallium/tests/trivial/compute.c and then the test with mask 8,
>> test_input_global() to work
2019 Jul 02
2
RFC: Complex in LLVM
Tim Northover <t.p.northover at gmail.com> writes:
> On Mon, 1 Jul 2019 at 19:56, David Greene via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> llvm.creal.* - Overloaded intrinsic to extract the real part of a
>> complex value
>> declare float @llvm.creal.c32(c32 %Val)
>> declare double @llvm.creal.c64(c64 %Val)
>
> What are
2008 Jun 02
2
[LLVMdev] Plans considering first class structs and multiple return values
Hi Dan,
> The requirement to update all callers' call instructions when a callee
> gets a new return value is also present in the current MRV-mechanism
> with getresult. It's not been a problem we've worried about so far.
I didn't mean you can get away without updating your calllers, I'm just saying
it could be a bit easier.
> Can you give some background about
2019 Jun 27
5
[RFC] ASM Goto With Output Constraints
[Adding the correct cfe-dev mailing list address.]
On Thu, Jun 27, 2019 at 11:06 AM Bill Wendling <isanbard at gmail.com> wrote:
> Now that ASM goto support has landed, Nick Desaulniers and I wrote up a
> document describing how to expand clang's implementation of ASM goto to
> support output constraints. The work *should* be straight-forward, but as
> always will need to
2012 Dec 30
0
[LLVMdev] alignment issue, getting corrupt double values
I also saw this issue before. Llvm seems have trouble returning general
struct values from functions. One easy workaround is to use packed struct
type.
Hope this helps.
-Peng
On Sunday, December 30, 2012, edA-qa mort-ora-y wrote:
> I'm having an issue where a certain set of types and insert/extractvalue
> are producing the incorrect values. It appears as though extractvalue
>
2016 Feb 22
4
Dealing with opencl kernel parameters in nouveau now that RES support is gone
Hi,
On 22-02-16 14:04, Samuel Pitoiset wrote:
>
> On 02/22/2016 01:46 PM, Hans de Goede wrote:
>> Hi,
>>
>> On 22-02-16 13:41, Samuel Pitoiset wrote:
>>> Hi there,
>>>
>>> On 02/22/2016 12:26 PM, Hans de Goede wrote:
>>
>> <snip>
>>
>>>> So back to the problem of getting OpenCL(ish) code to work again with
2010 May 19
0
[LLVMdev] Intrinsics and dead instruction/code elimination
On May 19, 2010, at 7:07 AM, o.j.sivart at gmail.com wrote:
> Hi all,
>
> I'm interested in the impact of representing code via intrinsic functions, in contrast to via an instruction, when it comes to performing dead instruction/code elimination. As a concrete example, lets consider the simple case of the llvm.*.with.overflow.* intrinsics.
>
> If I have some sequence (> 1)