LLVM  13.0.0git
Namespaces | Macros | Functions | Variables
SVEIntrinsicOpts.cpp File Reference
#include "AArch64.h"
#include "Utils/AArch64BaseInfo.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/IntrinsicsAArch64.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/Debug.h"
Include dependency graph for SVEIntrinsicOpts.cpp:

Go to the source code of this file.

Namespaces

 llvm
 

Macros

#define DEBUG_TYPE   "aarch64-sve-intrinsic-opts"
 

Functions

void llvm::initializeSVEIntrinsicOptsPass (PassRegistry &)
 
 INITIALIZE_PASS_DEPENDENCY (DominatorTreeWrapperPass)
 
static bool isPTruePromoted (IntrinsicInst *PTrue)
 Checks if a ptrue intrinsic call is promoted. More...
 

Variables

static const char * name = "SVE intrinsics optimizations"
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "aarch64-sve-intrinsic-opts"

Definition at line 42 of file SVEIntrinsicOpts.cpp.

Function Documentation

◆ INITIALIZE_PASS_DEPENDENCY()

INITIALIZE_PASS_DEPENDENCY ( DominatorTreeWrapperPass  )

◆ isPTruePromoted()

static bool isPTruePromoted ( IntrinsicInst PTrue)
static

Checks if a ptrue intrinsic call is promoted.

The act of promoting a ptrue will introduce zeroing. For example:

%1 = <vscale x 4 x i1> call @llvm.aarch64.sve.ptrue.nxv4i1(i32 31)
%2 = <vscale x 16 x i1> call @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> %1)
%3 = <vscale x 8 x i1> call @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %2)

%1 is promoted, because it is converted:

<vscale x 4 x i1> => <vscale x 16 x i1> => <vscale x 8 x i1>

via a sequence of the SVE reinterpret intrinsics convert.{to,from}.svbool.

Definition at line 105 of file SVEIntrinsicOpts.cpp.

References llvm::Value::getType(), llvm::PatternMatch::match(), and llvm::Value::users().

Variable Documentation

◆ name

const char* name = "SVE intrinsics optimizations"
static