Displaying 20 results from an estimated 4000 matches similar to: "RFC: Legalize input operand to ATOMIC_CMP_SWAP* by zero-extending"
2016 Mar 15
2
how to type-legalize a dag
On Tue, Mar 15, 2016 at 2:21 PM, Krzysztof Parzyszek via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On 3/15/2016 4:16 PM, Rail Shafigulin via llvm-dev wrote:
>
>> Below is the output of llc with a -debug-only=isel. As you could see the
>> output type for load, store, and add changes from v4i32 to i32 during
>> legalization. How can I preserve the output type to
2017 Jul 20
3
Issue with DAG legalization of brcond, setcc, xor
Hi,
I am having some issues with how some of the instructions are being
legalized.
So this is my intial basic block. The area of concern is the last three
instructions. I will pick and choose debug output to keep this small.
SelectionDAG has 36 nodes:
t0: ch = EntryToken
t6: i32,ch = CopyFromReg t0, Register:i32 %vreg507
t2: i32,ch = CopyFromReg t0, Register:i32 %vreg17
2014 Jun 12
6
[LLVMdev] RFC: add "cmpxchg weak" to LLVM IR
Hi all,
I've decided the next step in atomics is the weak compare-and-exchange
operation. As with the failure order, I'm going t outline the
direction I'd like to take:
1. All cmpxchg instructions now return { iN, i1 } where the first
value is what we got before (the loaded result), the second == 1 if an
exchange took place.
1. "weak" is an optional modifier to the cmpxchg
2017 Jul 21
4
Issue with DAG legalization of brcond, setcc, xor
But isn't kinda silly that we transform to xor and then we transform it
back. What is the advantage in doing so? Also, since we do that method, I
now have to introduce setcc patterns for i1 values, instead of being able
to just use logical pattern operators like not.
-Dilan
On Fri, Jul 21, 2017 at 11:00 AM Dilan Manatunga <manatunga at gmail.com>
wrote:
> For some reason I
2009 May 21
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On Wed, May 20, 2009 at 5:26 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Wed, May 20, 2009 at 4:55 PM, Dan Gohman <gohman at apple.com> wrote:
>> Can you explain why you chose the approach of using a new pass?
>> I pictured removing LegalizeDAG's type legalization code would
>> mostly consist of finding all the places that use TLI.getTypeAction
2014 Jun 13
2
[LLVMdev] RFC: add "cmpxchg weak" to LLVM IR
Hi Chandler,
> So, I see where you're going here, but I'm curious -- why not just switch
> ATOMIC_CMP_SWAP to have a second i1 value, and still be strong? Is this
> *just* to support expanding? I wonder if that's really useful rather than
> just lowering it directly on the various targets....
I tried that originally, but quickly got into murky waters with all
the targets
2008 Jul 02
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Evan Cheng wrote:
> You need to insert new basic blocks and update CFG to accomplish this.
> There is a hackish way to do this right now. Add a pseudo instruction
> to represent this operation and mark it usesCustomDAGSchedInserter.
> This means the intrinsic is mapped to a single (pseudo) node. But it
> is then expanded into instructions that can span multiple basic
>
2009 Nov 13
3
[LLVMdev] legalize dag problem
Hi
I am running into a legalize dag issue after custom lowering a
load. If someone can give me pointers that would be great. I am using
llvm 2.6
When custom lowering a load, the following code gets executed.
Tmp1 = TLI.LowerOperation(Tmp3, DAG);
if (Tmp1.getNode()) {
Tmp3 = LegalizeOp(Tmp1);
Tmp4 = LegalizeOp(Tmp1.getValue(1)); <----------------- what
2008 Jul 11
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Hi Evan,
Evan Cheng wrote:
> This does not patch cleanly for me (PPCISelLowering.cpp). Can you
> prepare a updated patch?
This should work, though I won't have access to my test box now until
next Thursday so no guarantees :)
Cheers,
Gary
--
http://gbenson.net/
-------------- next part --------------
Index: lib/Target/PowerPC/PPCISelLowering.h
2016 Mar 16
3
how to type-legalize a dag
On 3/16/2016 12:53 PM, Rail Shafigulin wrote:
>
> On Wed, Mar 16, 2016 at 10:39 AM, Krzysztof Parzyszek via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
> On 3/16/2016 12:36 PM, Krzysztof Parzyszek via llvm-dev wrote:
>
> If the action is "Expand", which will convert the operation into
>
>
>
2008 Jul 09
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Ah, didn't see that, that's what comes of trying to do something at
5pm :) I attached an updated patch which creates a virtual register
instead of using R0. How does this look?
Cheers,
Gary
Dan Gohman wrote:
> PPCTargetLowering::EmitInstrWithCustomInserter has a reference
> to the current MachineFunction for other purposes. Can you use
> MachineFunction::getRegInfo instead?
2018 Jun 29
2
[RFC][VECLIB] how should we legalize VECLIB calls?
Illustrative Example:
clang -fveclib=SVML -O3 svml.c -mavx
#include <math.h>
void foo(double *a, int N){
int i;
#pragma clang loop vectorize_width(8)
for (i=0;i<N;i++){
a[i] = sin(i);
}
}
Currently, this results in a call to <8 x double> __svml_sin8(<8 x double>) after the vectorizer.
This is 8-element SVML sin() called with 8-element argument. On the surface,
2016 Dec 23
2
struct bitfield regression between 3.6 and 3.9 (using -O0)
Given that this is compiled with -O0, would there a way to skip the
Optimization of the Type-legalized selection DAG? It's fine until it
optimizes the Type-legalized selection DAG into the Optimized
Type-legalized selection DAG.
Phil
On Thu, Dec 22, 2016 at 10:29 AM, Friedman, Eli <efriedma at codeaurora.org>
wrote:
> On 12/21/2016 4:45 PM, Phil Tomson via llvm-dev wrote:
>
>
2018 Sep 21
2
[GlobalISel] Legalize generic instructions that also depend on type of scalar, not only scalar size
Hi,
Mips32 has 64 bit floating point instructions, while i64 instructions
have to be emulated with i32 instructions. This means that G_LOAD should
be custom legalized for s64 integer value, and be legal for s64 floating
point value. There are also other generic instructions with the same
problem: G_STORE, G_SELECT, G_EXTRACT, and G_INSERT.
There are also other configurations where integer
2018 Jun 29
2
[RFC][VECLIB] how should we legalize VECLIB calls?
Ashutosh,
Thanks for the repy.
Related earlier topic on this appears in the review of the SVML patch (@mmasten). Adding few names from there.
https://reviews.llvm.org/D19544
There, I see Hal's review comment "let's start only with the directly-legal calls". Apparently, what we have right now
in the trunk is "not legal enough". I'll work on the patch to stop
2008 Jul 10
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Cool, that worked. New patch attached...
Cheers,
Gary
Evan Cheng wrote:
> Just cast both values to const TargetRegisterClass*.
>
> Evan
>
> On Jul 10, 2008, at 7:36 AM, Gary Benson wrote:
> > Evan Cheng wrote:
> > > How about?
> > >
> > > const TargetRegisterClass *RC = is64Bit ? &PPC:GPRCRegClass :
> > > &PPC:G8RCRegClass;
>
2016 Dec 22
2
struct bitfield regression between 3.6 and 3.9 (using -O0)
Here's our testcase:
#include <stdio.h>
struct flags {
unsigned frog: 1;
unsigned foo : 1;
unsigned bar : 1;
unsigned bat : 1;
unsigned baz : 1;
unsigned bam : 1;
};
int main() {
struct flags flags;
flags.bar = 1;
flags.foo = 1;
if (flags.foo == 1) {
printf("Pass\n");
return 0;
} else {
2016 Dec 22
0
struct bitfield regression between 3.6 and 3.9 (using -O0)
On 12/21/2016 4:45 PM, Phil Tomson via llvm-dev wrote:
> Here's our testcase:
>
> #include <stdio.h>
>
> struct flags {
> unsigned frog: 1;
> unsigned foo : 1;
> unsigned bar : 1;
> unsigned bat : 1;
> unsigned baz : 1;
> unsigned bam : 1;
> };
>
> int main() {
> struct flags flags;
> flags.bar = 1;
>
2018 Jul 02
2
[RFC][VECLIB] how should we legalize VECLIB calls?
Adding to Ashutosh's comments, We are also interested in making LLVM
generate vector math library calls that are available with glibc (version >
2.22).
reference: https://sourceware.org/glibc/wiki/libmvec
Using the example case given in the reference, we found there are 2 vector
versions for "sin" (4 X double) with same VF namely _ZGVcN4v_sin (avx)
version and _ZGVdN4v_sin
2013 Apr 02
1
[LLVMdev] Promoting i1 to i32 does not work...
Hi there,
I'm having a hard time with promoting operands from i1 to i32 in my
backend...
I have to register classes, VTs are i1 and i32. The i1 registers are
only for predication and conditional jumps, so I want to use them with
brcond, setcc.
There are no instructions to directly load a value in an i1 register or
to copy between i1 and i32, so I need the DAG Legalizing Pass to not
generate