LLVM  16.0.0git
Functions
AMDGPUCombinerHelper.cpp File Reference
#include "AMDGPUCombinerHelper.h"
#include "GCNSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/Target/TargetMachine.h"
Include dependency graph for AMDGPUCombinerHelper.cpp:

Go to the source code of this file.

Functions

static LLVM_READNONE bool fnegFoldsIntoMI (const MachineInstr &MI)
 
static LLVM_READONLY bool opMustUseVOP3Encoding (const MachineInstr &MI, const MachineRegisterInfo &MRI)
 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. More...
 
static LLVM_READONLY bool hasSourceMods (const MachineInstr &MI)
 
static bool allUsesHaveSourceMods (MachineInstr &MI, MachineRegisterInfo &MRI, unsigned CostThreshold=4)
 
static bool mayIgnoreSignedZero (MachineInstr &MI)
 
static bool isInv2Pi (const APFloat &APF)
 
static bool isConstantCostlierToNegate (MachineInstr &MI, Register Reg, MachineRegisterInfo &MRI)
 
static unsigned inverseMinMax (unsigned Opc)
 

Function Documentation

◆ allUsesHaveSourceMods()

static bool allUsesHaveSourceMods ( MachineInstr MI,
MachineRegisterInfo MRI,
unsigned  CostThreshold = 4 
)
static

◆ fnegFoldsIntoMI()

static LLVM_READNONE bool fnegFoldsIntoMI ( const MachineInstr MI)
static

Definition at line 20 of file AMDGPUCombinerHelper.cpp.

References MI.

Referenced by AMDGPUCombinerHelper::matchFoldableFneg().

◆ hasSourceMods()

static LLVM_READONLY bool hasSourceMods ( const MachineInstr MI)
static

Definition at line 76 of file AMDGPUCombinerHelper.cpp.

References llvm::ISD::INLINEASM, llvm::ISD::INLINEASM_BR, and MI.

Referenced by allUsesHaveSourceMods().

◆ inverseMinMax()

static unsigned inverseMinMax ( unsigned  Opc)
static

Definition at line 165 of file AMDGPUCombinerHelper.cpp.

References llvm_unreachable.

Referenced by AMDGPUCombinerHelper::applyFoldableFneg().

◆ isConstantCostlierToNegate()

static bool isConstantCostlierToNegate ( MachineInstr MI,
Register  Reg,
MachineRegisterInfo MRI 
)
static

◆ isInv2Pi()

static bool isInv2Pi ( const APFloat APF)
static

◆ mayIgnoreSignedZero()

static bool mayIgnoreSignedZero ( MachineInstr MI)
static

Definition at line 134 of file AMDGPUCombinerHelper.cpp.

References MI, and Options.

Referenced by AMDGPUCombinerHelper::matchFoldableFneg().

◆ opMustUseVOP3Encoding()

static LLVM_READONLY bool opMustUseVOP3Encoding ( const MachineInstr MI,
const MachineRegisterInfo MRI 
)
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 67 of file AMDGPUCombinerHelper.cpp.

References getScalarSizeInBits(), llvm::MachineRegisterInfo::getType(), MI, and MRI.

Referenced by allUsesHaveSourceMods().