LLVM 20.0.0git
Functions | Variables
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/Constants.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/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>

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()

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

Definition at line 522 of file X86InterleavedAccess.cpp.

References Concat, and llvm::IRBuilderBase::CreateShuffleVector().

◆ createShuffleStride()

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

◆ DecodePALIGNRMask()

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

◆ genShuffleBland()

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

◆ group2Shuffle()

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

◆ reorderSubVector()

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

◆ scaleVectorType()

static MVT scaleVectorType ( MVT  VT)
static

◆ setGroupSize()

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

Variable Documentation

◆ Concat

constexpr 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 235 of file X86InterleavedAccess.cpp.

Referenced by AddCombineVUZPToVPADDL(), combineEXTRACT_SUBVECTOR(), combineScalarAndWithMaskSetcc(), combineShuffleOfConcatUndef(), combineVectorPack(), ConcatStringInits(), concatSubVector(), llvm::AMDGPULegalizerInfo::legalizeImageIntrinsic(), performBuildVectorCombine(), performUADDVZextCombine(), performUzpCombine(), performVectorTruncZeroCombine(), reorderSubVector(), and llvm::InstCombinerImpl::visitOr().