LLVM 22.0.0git
X86InterleavedAccess.cpp File Reference

This file contains the X86 implementation of the interleaved accesses optimization generating X86-specific instructions/intrinsics for interleaved access groups. More...

#include "X86ISelLowering.h"
#include "X86Subtarget.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/CodeGenTypes/MachineValueType.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include <algorithm>
#include <cassert>
#include <cmath>

Go to the source code of this file.

Functions

static MVT scaleVectorType (MVT VT)
static void genShuffleBland (MVT VT, ArrayRef< int > Mask, SmallVectorImpl< int > &Out, int LowOffset, int HighOffset)
static void reorderSubVector (MVT VT, SmallVectorImpl< Value * > &TransposedMatrix, ArrayRef< Value * > Vec, ArrayRef< int > VPShuf, unsigned VecElems, unsigned Stride, IRBuilder<> &Builder)
static void createShuffleStride (MVT VT, int Stride, SmallVectorImpl< int > &Mask)
static void setGroupSize (MVT VT, SmallVectorImpl< int > &SizeInfo)
static void DecodePALIGNRMask (MVT VT, unsigned Imm, SmallVectorImpl< int > &ShuffleMask, bool AlignDirection=true, bool Unary=false)
static void concatSubVector (Value **Vec, ArrayRef< Instruction * > InVec, unsigned VecElems, IRBuilder<> &Builder)
static void group2Shuffle (MVT VT, SmallVectorImpl< int > &Mask, SmallVectorImpl< int > &Output)

Variables

static constexpr int Concat []

Detailed Description

This file contains the X86 implementation of the interleaved accesses optimization generating X86-specific instructions/intrinsics for interleaved access groups.

Definition in file X86InterleavedAccess.cpp.

Function Documentation

◆ concatSubVector()

void concatSubVector ( Value ** Vec,
ArrayRef< Instruction * > InVec,
unsigned VecElems,
IRBuilder<> & Builder )
static

Definition at line 519 of file X86InterleavedAccess.cpp.

References Concat.

◆ createShuffleStride()

void createShuffleStride ( MVT VT,
int Stride,
SmallVectorImpl< int > & Mask )
static

◆ DecodePALIGNRMask()

void DecodePALIGNRMask ( MVT VT,
unsigned Imm,
SmallVectorImpl< int > & ShuffleMask,
bool AlignDirection = true,
bool Unary = false )
static

◆ genShuffleBland()

void genShuffleBland ( MVT VT,
ArrayRef< int > Mask,
SmallVectorImpl< int > & Out,
int LowOffset,
int HighOffset )
static

◆ group2Shuffle()

void group2Shuffle ( MVT VT,
SmallVectorImpl< int > & Mask,
SmallVectorImpl< int > & Output )
static

◆ reorderSubVector()

void reorderSubVector ( MVT VT,
SmallVectorImpl< Value * > & TransposedMatrix,
ArrayRef< Value * > Vec,
ArrayRef< int > VPShuf,
unsigned VecElems,
unsigned Stride,
IRBuilder<> & Builder )
static

◆ scaleVectorType()

◆ setGroupSize()

void setGroupSize ( MVT VT,
SmallVectorImpl< int > & SizeInfo )
static

Variable Documentation

◆ Concat

int Concat[]
staticconstexpr
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}

Definition at line 232 of file X86InterleavedAccess.cpp.

Referenced by AddCombineVUZPToVPADDL(), combineScalarAndWithMaskSetcc(), combineVectorPack(), ConcatStringInits(), concatSubVector(), tomp::type::DefinedOperatorT< I, E >::ENUM(), llvm::AMDGPULegalizerInfo::legalizeImageIntrinsic(), lowerVECTOR_SHUFFLE(), performBitcastCombine(), performBuildVectorCombine(), performUADDVZextCombine(), performUzpCombine(), performVectorTruncZeroCombine(), reorderSubVector(), and llvm::InstCombinerImpl::visitOr().