LLVM 22.0.0git
AMDGPUISelLowering.cpp File Reference

This is the parent TargetLowering class for hardware code gen targets. More...

#include "AMDGPUISelLowering.h"
#include "AMDGPU.h"
#include "AMDGPUInstrInfo.h"
#include "AMDGPUMachineFunction.h"
#include "AMDGPUMemoryUtils.h"
#include "SIMachineFunctionInfo.h"
#include "llvm/CodeGen/Analysis.h"
#include "llvm/CodeGen/GlobalISel/GISelValueTracking.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Target/TargetMachine.h"
#include "AMDGPUGenCallingConv.inc"

Go to the source code of this file.

Macros

#define NODE_NAME_CASE(node)

Functions

static LLVM_READNONE bool fnegFoldsIntoOpcode (unsigned Opc)
static bool fnegFoldsIntoOp (const SDNode *N)
static LLVM_READONLY bool opMustUseVOP3Encoding (const SDNode *N, MVT VT)
 returns true if the operation will definitely need to use a 64-bit encoding, and thus will use a VOP3 encoding regardless of the source modifiers.
static LLVM_READONLY bool selectSupportsSourceMods (const SDNode *N)
 Return true if v_cndmask_b32 will support fabs/fneg source modifiers for the type for ISD::SELECT.
static LLVM_READONLY bool hasSourceMods (const SDNode *N)
static SDValue peekFNeg (SDValue Val)
static SDValue peekFPSignOps (SDValue Val)
static SDValue extractF64Exponent (SDValue Hi, const SDLoc &SL, SelectionDAG &DAG)
static bool valueIsKnownNeverF32Denorm (SDValue Src)
 Return true if it's known that Src can never be an f32 denormal value.
static SDValue getMad (SelectionDAG &DAG, const SDLoc &SL, EVT VT, SDValue X, SDValue Y, SDValue C, SDNodeFlags Flags=SDNodeFlags())
static bool isCtlzOpc (unsigned Opc)
static bool isCttzOpc (unsigned Opc)
static bool isU24 (SDValue Op, SelectionDAG &DAG)
static bool isI24 (SDValue Op, SelectionDAG &DAG)
static SDValue simplifyMul24 (SDNode *Node24, TargetLowering::DAGCombinerInfo &DCI)
template<typename IntTy>
static SDValue constantFoldBFE (SelectionDAG &DAG, IntTy Src0, uint32_t Offset, uint32_t Width, const SDLoc &DL)
static bool hasVolatileUser (SDNode *Val)
static SDValue getMul24 (SelectionDAG &DAG, const SDLoc &SL, SDValue N0, SDValue N1, unsigned Size, bool Signed)
static SDValue getAddOneOp (const SDNode *V)
 If V is an add of a constant 1, returns the other operand.
static SDValue distributeOpThroughSelect (TargetLowering::DAGCombinerInfo &DCI, unsigned Op, const SDLoc &SL, SDValue Cond, SDValue N1, SDValue N2)
static bool isInv2Pi (const APFloat &APF)
static unsigned inverseMinMax (unsigned Opc)
static int getOrCreateFixedStackObject (MachineFrameInfo &MFI, unsigned Size, int64_t Offset)
static unsigned workitemIntrinsicDim (unsigned ID)

Variables

static cl::opt< boolAMDGPUBypassSlowDiv ("amdgpu-bypass-slow-div", cl::desc("Skip 64-bit divide for dynamic 32-bit values"), cl::init(true))

Detailed Description

This is the parent TargetLowering class for hardware code gen targets.

Definition in file AMDGPUISelLowering.cpp.

Macro Definition Documentation

◆ NODE_NAME_CASE

#define NODE_NAME_CASE ( node)

Function Documentation

◆ constantFoldBFE()

template<typename IntTy>
SDValue constantFoldBFE ( SelectionDAG & DAG,
IntTy Src0,
uint32_t Offset,
uint32_t Width,
const SDLoc & DL )
static

◆ distributeOpThroughSelect()

◆ extractF64Exponent()

◆ fnegFoldsIntoOp()

◆ fnegFoldsIntoOpcode()

◆ getAddOneOp()

SDValue getAddOneOp ( const SDNode * V)
static

If V is an add of a constant 1, returns the other operand.

Otherwise return SDValue().

Definition at line 4492 of file AMDGPUISelLowering.cpp.

References llvm::ISD::ADD, llvm::isOneConstant(), and SDValue().

Referenced by llvm::AMDGPUTargetLowering::performMulCombine().

◆ getMad()

◆ getMul24()

◆ getOrCreateFixedStackObject()

◆ hasSourceMods()

◆ hasVolatileUser()

bool hasVolatileUser ( SDNode * Val)
static

◆ inverseMinMax()

unsigned inverseMinMax ( unsigned Opc)
static

◆ isCtlzOpc()

◆ isCttzOpc()

◆ isI24()

◆ isInv2Pi()

◆ isU24()

◆ opMustUseVOP3Encoding()

LLVM_READONLY bool opMustUseVOP3Encoding ( const SDNode * N,
MVT VT )
static

returns true if the operation will definitely need to use a 64-bit encoding, and thus will use a VOP3 encoding regardless of the source modifiers.

Definition at line 721 of file AMDGPUISelLowering.cpp.

References N, and llvm::ISD::SELECT.

◆ peekFNeg()

◆ peekFPSignOps()

◆ selectSupportsSourceMods()

LLVM_READONLY bool selectSupportsSourceMods ( const SDNode * N)
static

Return true if v_cndmask_b32 will support fabs/fneg source modifiers for the type for ISD::SELECT.

Definition at line 729 of file AMDGPUISelLowering.cpp.

References N.

Referenced by llvm::AMDGPUTargetLowering::foldFreeOpFromSelect(), and hasSourceMods().

◆ simplifyMul24()

◆ valueIsKnownNeverF32Denorm()

bool valueIsKnownNeverF32Denorm ( SDValue Src)
static

Return true if it's known that Src can never be an f32 denormal value.

Definition at line 2625 of file AMDGPUISelLowering.cpp.

References llvm::ISD::INTRINSIC_WO_CHAIN, and llvm_unreachable.

Referenced by llvm::AMDGPUTargetLowering::needsDenormHandlingF32(), and needsDenormHandlingF32().

◆ workitemIntrinsicDim()

unsigned workitemIntrinsicDim ( unsigned ID)
static

Variable Documentation

◆ AMDGPUBypassSlowDiv

cl::opt< bool > AMDGPUBypassSlowDiv("amdgpu-bypass-slow-div", cl::desc("Skip 64-bit divide for dynamic 32-bit values"), cl::init(true)) ( "amdgpu-bypass-slow-div" ,
cl::desc("Skip 64-bit divide for dynamic 32-bit values") ,
cl::init(true)  )
static