search for: shufflevectorinst

Displaying 20 results from an estimated 21 matches for "shufflevectorinst".

2010 Feb 02
2
[LLVMdev] llvm::ShuffleVectorInst yields incorrect vector length in 2.6
Hi, When I emit the llvm::ShuffleVectorInst instruction from my code generator the result vector has the length of vector 1, instead of the element type of vector 1 and the length of the mask vector; %13 = load <3 x float>* %w ; <<3 x float>> [#uses=0] %14 = shufflevector <3 x float> %13, &lt...
2010 Feb 02
0
[LLVMdev] llvm::ShuffleVectorInst yields incorrect vector length in 2.6
On Feb 2, 2010, at 4:56 AM, Maarten Hoeben wrote: > > Hi, > > When I emit the llvm::ShuffleVectorInst instruction from my code generator > the result vector has the length of vector 1, instead of the element type of > vector 1 and the length of the mask vector; > > %13 = load <3 x float>* %w ; <<3 x float>> [#uses=0] > %14 = shufflevector &lt...
2010 Feb 02
1
[LLVMdev] llvm::ShuffleVectorInst yields incorrect vector length in 2.6
...<3 x float>> [#uses=0] > > The type of %14 should be <2 x float>, since the elements are floats and > the mask has 2 entries. What do you mean when you write that it has "the > length of vector 1"? > By length of "the length of vector 1" I meant ShuffleVectorInst yields a vector value with the same number of elements as the first argument (or second for that matter - they should be the same). In other words it returns a vector <3 x float>. From the documentation I understood, and your answers confirms, that it should return a vector of type <2 x fl...
2012 Apr 12
0
[LLVMdev] detection of constant diagonal matrix * vector
...Operator* leftMul = dyn_cast<BinaryOperator>(LHS); BinaryOperator* rightMul = dyn_cast<BinaryOperator>(RHS); if (leftMul != NULL && rightMul != NULL && leftMul->getOpcode() == Instruction::FMul && rightMul->getOpcode() == Instruction::FMul) { ShuffleVectorInst* leftShuffle = dyn_cast<ShuffleVectorInst>(leftMul->getOperand(0)); ShuffleVectorInst* rightShuffle = dyn_cast<ShuffleVectorInst>(rightMul->getOperand(0)); // get multiplication constant vectors (e.g. [0 1]) ConstantVector* leftConstVector = llvm::dyn_cast<Co...
2011 Dec 02
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...e; Type *SrcTy = C->getSrcTy() if (!SrcTy->isSingleValueType() || SrcTy->isPointerTy) return false; Type *DestTy = C->getDestTy() if (!DestTy->isSingleValueType() || DestTy->isPointerTy) return false; } > + > + if (!(I->isBinaryOp() || isa<ShuffleVectorInst>(I) || > + isa<ExtractElementInst>(I) || isa<InsertElementInst>(I) || > + (!NoCasts&& IsCast) || VIntr || > + (!NoMemOps&& IsSimpleLoadStore))) { > + return false; > + } else if (I->isBinaryOp || isa<S...
2011 Dec 14
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...Ty->isSingleValueType() || SrcTy->isPointerTy) > return false; > > Type *DestTy = C->getDestTy() > > if (!DestTy->isSingleValueType() || DestTy->isPointerTy) > return false; > } > > > + > > + if (!(I->isBinaryOp() || isa<ShuffleVectorInst>(I) || > > + isa<ExtractElementInst>(I) || isa<InsertElementInst>(I) || > > + (!NoCasts&& IsCast) || VIntr || > > + (!NoMemOps&& IsSimpleLoadStore))) { > > + return false; > > + } > > else...
2011 Nov 23
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Mon, 2011-11-21 at 21:22 -0600, Hal Finkel wrote: > On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: > > Tobias, > > > > I've attached an updated patch. It contains a few bug fixes and many > > (refactoring and coding-convention) changes inspired by your comments. > > > > I'm currently trying to fix the bug responsible for causing a compile
2011 Dec 02
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...Ty->isSingleValueType() || SrcTy->isPointerTy) > return false; > > Type *DestTy = C->getDestTy() > > if (!DestTy->isSingleValueType() || DestTy->isPointerTy) > return false; > } > > > + > > + if (!(I->isBinaryOp() || isa<ShuffleVectorInst>(I) || > > + isa<ExtractElementInst>(I) || isa<InsertElementInst>(I) || > > + (!NoCasts&& IsCast) || VIntr || > > + (!NoMemOps&& IsSimpleLoadStore))) { > > + return false; > > + } > > else...
2011 Nov 22
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: > Tobias, > > I've attached an updated patch. It contains a few bug fixes and many > (refactoring and coding-convention) changes inspired by your comments. > > I'm currently trying to fix the bug responsible for causing a compile > failure when compiling >
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,
2019 Nov 27
2
LangRef semantics for shufflevector with undef mask is incorrect
Ok, makes sense. My suggestion is that we patch the IR Verifier to ensure that the mask is indeed a vector of constants and/or undefs. Right now it only runs the standard checks for instructions. We will also run Alive2 on the test suite to make sure undef is never replaced in practice. Thanks, Nuno -----Original Message----- From: Eli Friedman <efriedma at quicinc.com> Sent: 27 de
2012 Jul 31
3
[LLVMdev] rotate
...tion) // Internal to passes only -HANDLE_OTHER_INST(52, VAArg , VAArgInst ) // vaarg instruction -HANDLE_OTHER_INST(53, ExtractElement, ExtractElementInst)// extract from vector -HANDLE_OTHER_INST(54, InsertElement, InsertElementInst) // insert into vector -HANDLE_OTHER_INST(55, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. -HANDLE_OTHER_INST(56, ExtractValue, ExtractValueInst)// extract from aggregate -HANDLE_OTHER_INST(57, InsertValue, InsertValueInst) // insert into aggregate -HANDLE_OTHER_INST(58, LandingPad, LandingPadInst) // Landing pad instruction. - LAST_OTHER_INST(58) + FIRST_OTH...
2020 Jan 30
7
[RFC] Extending shufflevector for vscale vectors (SVE etc.)
...present this list as an enum, and then wrap up the entire description of a fixed or scalable shuffle into a class "ShuffleMask". This would allow checking whether an operation matches one of the above patterns, and can be converted to the existing ArrayRef<int> for fixed shuffles. ShuffleVectorInst::getShuffleMask would then return a ShuffleMask, I think. Then we could add an alternate API getFixedShuffleMask() that only works for fixed shuffles, and just returns the fixed mask as an ArrayRef<int>. I'm working on refactoring the existing shufflevector handling in LLVM to allow maki...
2011 Nov 17
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...e if (cast<CastInst>(I)->getSrcTy()->isPointerTy()) { > + isCast = false; > + } else if (cast<CastInst>(I)->getDestTy()->isPointerTy()) { > + isCast = false; > + } > + } > + > + if (!(I->isBinaryOp() || isa<ShuffleVectorInst>(I) || > + isa<ExtractElementInst>(I) || isa<InsertElementInst>(I) || > + (!NoCasts&& isCast) || isGoodIntr || > + (!NoMemOps&& isLdStr))) { > + continue; > + } > + > + // We can't vect...
2011 Nov 21
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...etSrcTy()->isPointerTy()) { > > + isCast = false; > > + } else if (cast<CastInst>(I)->getDestTy()->isPointerTy()) { > > + isCast = false; > > + } > > + } > > + > > + if (!(I->isBinaryOp() || isa<ShuffleVectorInst>(I) || > > + isa<ExtractElementInst>(I) || isa<InsertElementInst>(I) || > > + (!NoCasts&& isCast) || isGoodIntr || > > + (!NoMemOps&& isLdStr))) { > > + continue; > > + } > > + &g...
2011 Nov 16
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, et al., Attached is the my autovectorization pass. I've fixed a bug that appears when using -bb-vectorize-aligned-only, fixed some 80-col violations, etc., and at least on x86_64, all test cases pass except for a few; and all of these failures look like instruction-selection bugs. For example: MultiSource/Applications/ClamAV - fails to compile shared_sha256.c with an error: error in
2011 Nov 15
3
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, I've attached the latest version of my autovectorization patch. I was able to add support for using the ScalarEvolution analysis for load/store pairing (thanks for your help!). This led to a modest performance increase and a modest compile-time increase. This version also has a cutoff as you suggested (although the default value is set high (4000 instructions between pairs) because
2020 Feb 07
2
[RFC] Extending shufflevector for vscale vectors (SVE etc.)
...d make sense to > canonicalize from shuffle vector to the ‘fixed’ formats, but doing that would > probably introduce a bunch of regressions for various targets. I'm thinking that we don't use the new named shuffles for fixed-width shuffles at the IR level. Instead, we add helpers to ShuffleVectorInst that match either a scalable shuffle, or an equivalent fixed shuffle. So code that wants to handle both can pretend they're canonicalized, and code that handles fixed shuffles won't be disrupted. In SelectionDAG, shuffles aren't really unified the same way they are in IR. I think we...
2020 Feb 08
2
[RFC] Extending shufflevector for vscale vectors (SVE etc.)
> -----Original Message----- > From: Chris Lattner <clattner at nondot.org> > Sent: Friday, February 7, 2020 3:00 PM > To: Eli Friedman <efriedma at quicinc.com> > Cc: llvm-dev <llvm-dev at lists.llvm.org> > Subject: [EXT] Re: [llvm-dev] [RFC] Extending shufflevector for vscale vectors > (SVE etc.) > > > On Feb 7, 2020, at 12:39 PM, Eli Friedman