Displaying 20 results from an estimated 265 matches for "shufflevectors".
Did you mean:
shufflevector
2019 Nov 26
4
LangRef semantics for shufflevector with undef mask is incorrect
Hi,
This is a follow up on a discussion around shufflevector with undef mask in
https://reviews.llvm.org/D70641 and
https://bugs.llvm.org/show_bug.cgi?id=43958.
The current semantics of shufflevector in
http://llvm.org/docs/LangRef.html#shufflevector-instruction states:
"If the shuffle mask is undef, the result vector is undef. If any element of
the mask operand is undef, that element
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
2017 Mar 30
2
InstructionSimplify: adding a hook for shufflevector instructions
As Sanjay noted in D31426<https://reviews.llvm.org/D31426#712701>, InstructionSimplify is missing the following simplification:
This function:
define <4 x i32> @splat_operand(<4 x i32> %x) {
%splat = shufflevector <4 x i32> %x, <4 x i32> undef, <4 x i32> zeroinitializer
%shuf = shufflevector <4 x i32> %splat, <4 x i32> undef, <4 x i32>
2019 Dec 09
2
[PATCH] D70246: [InstCombine] remove identity shuffle simplification for mask with undefs
Sanjay,
I'm looking at some missed optimizations caused by D70246. Here's a test case:
define <4 x float> @f(i32 %t32, <4 x float>* %t24) {
.entry:
%t43 = insertelement <3 x i32> undef, i32 %t32, i32 2
%t44 = bitcast <3 x i32> %t43 to <3 x float>
%t45 = shufflevector <3 x float> %t44, <3 x float> undef, <4 x i32>
<i32 0, i32 undef,
2008 Sep 30
0
[LLVMdev] Generalizing shuffle vector
Hi Mon Ping,
Generalizing shufflevector would be great. I have an additional
suggestion below.
On 29-Sep-08, at 11:11 PM, Mon Ping Wang wrote:
> I am proposing to extend the shuffle vector definition to be
> <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32>
> <mask> ; yields <m x <ty>>
>
> The
2008 Sep 30
2
[LLVMdev] Generalizing shuffle vector
I agree further generalization seems like a very good idea. But I'd
like to see what Mon Ping proposed implemented first so we have a
better idea of the implementation cost.
Thanks,
Evan
On Sep 30, 2008, at 6:44 AM, Stefanus Du Toit wrote:
> Hi Mon Ping,
>
> Generalizing shufflevector would be great. I have an additional
> suggestion below.
>
> On 29-Sep-08, at 11:11
2019 Nov 27
3
LangRef semantics for shufflevector with undef mask is incorrect
On 11/27/19 2:10 AM, Eli Friedman via llvm-dev wrote:
The shuffle mask of a shufflevector is special: it's required to be a constant in a specific form. From LangRef: "The shuffle mask operand is required to be a constant vector with either constant integer or undef values." So really, we can resolve this any way we want; "undef" in this context doesn't have to mean
2017 Mar 30
2
InstructionSimplify: adding a hook for shufflevector instructions
Thanks, Sanjay, that makes sense. The opportunity for improving instcombining splat sounds promising.
Another question about shuffle simplification. This is a testcase from test/Transforms/InstCombine/vec_shuffle.ll:
define <4 x i32> @test10(<4 x i32> %tmp5) nounwind {
%tmp6 = shufflevector <4 x i32> %tmp5, <4 x i32> undef, <4 x i32> <i32 1, i32 undef, i32
2014 Sep 26
2
[LLVMdev] Canonicalizing vector masking.
Hi, I received an internal test case from a game team (it wasn't about this
in particular), and I was wondering if there was maybe an opportunity to
canonicalize a particular code pattern:
%inputi = bitcast <4 x float> %input to <4 x i32>
%row0i = and <4 x i32> %inputi, <i32 -1, i32 0, i32 0, i32 0>
%row0 = bitcast <4 x i32> %row0i to <4 x float>
2016 Aug 28
2
IR canonicalization: vector select or shufflevector?
A vector select with a constant vector condition operand:
define <4 x i32> @foo(<4 x i32> %a, <4 x i32> %b) {
%sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i32>
%a, <4 x i32> %b
ret <4 x i32> %sel
}
...is equivalent to a shufflevector:
define <4 x i32> @goo(<4 x i32> %a, <4 x i32> %b) {
%shuf =
2016 Aug 29
2
IR canonicalization: vector select or shufflevector?
I have a slight preference towards shufflevector, because it makes
sequences of shuffles, where only some of the shuffles can be converted
into selects (because the input and output vector sizes of the others don't
match) simpler to reason about.
I'm not sure this is a particularly good reason, though.
On Mon, Aug 29, 2016 at 8:19 AM, Philip Reames via llvm-dev <
llvm-dev at
2017 Jan 17
2
IR canonicalization: shufflevector or vector trunc?
We use InstCombiner::ShouldChangeType() to prevent transforms to illegal
integer types, but I'm not sure how that would apply to vector types.
Ie, let's say v256 is a legal type in your example. DataLayout doesn't
appear to specify what configurations of a 256-bit vector are legal, so I
don't think we can currently use that to say v2i128 should be treated
differently than v16i16.
2017 Jan 21
2
IR canonicalization: shufflevector or vector trunc?
On Thu, Jan 19, 2017 at 9:17 AM, Rackover, Zvi <zvi.rackover at intel.com>
wrote:
> Hi Sanjay,
>
>
>
> I agree we should also discuss **if** this canonicalization is beneficial.
>
> For starters, do we have a concrete case where we would benefit from
> canonicalizing shuffles <-> truncates in LLVM IR?
>
> IMO, we should not count benefits for codegen
2017 Jan 13
2
IR canonicalization: shufflevector or vector trunc?
Right - I think that case looks like this for little endian:
define <2 x i32> @zextshuffle(<2 x i16> %x) {
%zext_shuffle = shufflevector <2 x i16> %x, <2 x i16> zeroinitializer, <4
x i32> <i32 0, i32 2, i32 1, i32 2>
%bc = bitcast <4 x i16> %zext_shuffle to <2 x i32>
ret <2 x i32> %bc
}
define <2 x i32> @zextvec(<2 x i16>
2008 Sep 30
4
[LLVMdev] Generalizing shuffle vector
Hi,
The current definition of shuffle vector is
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <n x
i32> <mask> ; yields <n x <ty>>
The first two operands of a 'shufflevector' instruction are vectors
with types that match each other and types that match the result of
the instruction. The third
2016 Aug 29
2
IR canonicalization: vector select or shufflevector?
x86 has also put a lot of effort into shuffle lowering...so much so that it
is its own life-form and brings most online codeviewer apps to their knees
when you try to open X86ISelLowering.cpp. :)
Given that:
1. There are at least 2 targets that lean towards shuffle (Martin's comment
+ x86 uses lowerVSELECTtoVectorShuffle() for all cases like the example
posted here)
2. Size-changing shuffles
2008 Sep 30
0
[LLVMdev] Generalizing shuffle vector
Hi,
I agree that the more general shufflevector is more useful. I
narrowed the original proposal a little bit because of the concern for
the implementation cost. However, the slightly narrowed definition
will probably require falling backing to generate insert and extracts
for complex masks so it is possible that there will be no extra cost
in supporting the more general definition.
2017 Mar 14
3
llvm-stress crash
Hi,
Using llvm-stress, I got a crash after Post-RA pseudo expansion, with
machine verifier.
A 128 bit register
%vreg233:subreg_l32<def,read-undef> = LLCRMux %vreg119;
GR128Bit:%vreg233 GRX32Bit:%vreg119
gets spilled:
%vreg265:subreg_l32<def,read-undef> = LLCRMux %vreg119;
GR128Bit:%vreg265 GRX32Bit:%vreg119
ST128 %vreg265, <fi#10>, 0, %noreg;
2020 Jan 30
7
[RFC] Extending shufflevector for vscale vectors (SVE etc.)
Currently, for scalable vectors, only splat shuffles are allowed; we're considering allowing more different kinds of shuffles. The issue is, essentially, that a shuffle mask is a simple list of integers, and that isn't enough to express a scalable operation. For example, concatenating two fixed-length vectors currently looks like this:
shufflevector <2 x i32> %v1, <2 x i32>
2016 Oct 10
2
[arm, aarch64] Alignment checking in interleaved access pass
On Mon, Oct 10, 2016 at 1:14 PM, Renato Golin <renato.golin at linaro.org>
wrote:
> On 10 October 2016 at 19:39, Alina Sbirlea <alina.sbirlea at gmail.com>
> wrote:
> > Now, for ARM archs Halide is currently generating explicit VSTn
> intrinsics,
> > with some of the patterns I described, and I found no reason why Halide
> > shouldn't generate a single