LLVM 20.0.0git
Enumerations | Functions
llvm::ARM_AM Namespace Reference

ARM_AM - ARM Addressing Mode Stuff. More...

Enumerations

enum  ShiftOpc {
  no_shift = 0 , asr , lsl , lsr ,
  ror , rrx , uxtw
}
 
enum  AddrOpc { sub = 0 , add }
 
enum  AMSubMode {
  bad_am_submode = 0 , ia , ib , da ,
  db
}
 

Functions

static ShiftOpc getShiftOpcForNode (unsigned Opcode)
 
const chargetAddrOpcStr (AddrOpc Op)
 
const StringRef getShiftOpcStr (ShiftOpc Op)
 
unsigned getShiftOpcEncoding (ShiftOpc Op)
 
const chargetAMSubModeStr (AMSubMode Mode)
 
unsigned getSORegOpc (ShiftOpc ShOp, unsigned Imm)
 
unsigned getSORegOffset (unsigned Op)
 
ShiftOpc getSORegShOp (unsigned Op)
 
unsigned getSOImmValImm (unsigned Imm)
 getSOImmValImm - Given an encoded imm field for the reg/imm form, return the 8-bit imm value.
 
unsigned getSOImmValRot (unsigned Imm)
 getSOImmValRot - Given an encoded imm field for the reg/imm form, return the rotate amount.
 
unsigned getSOImmValRotate (unsigned Imm)
 getSOImmValRotate - Try to handle Imm with an immediate shifter operand, computing the rotate amount to use.
 
int getSOImmVal (unsigned Arg)
 getSOImmVal - Given a 32-bit immediate, if it is something that can fit into an shifter_operand immediate operand, return the 12-bit encoding for it.
 
bool isSOImmTwoPartVal (unsigned V)
 isSOImmTwoPartVal - Return true if the specified value can be obtained by or'ing together two SOImmVal's.
 
unsigned getSOImmTwoPartFirst (unsigned V)
 getSOImmTwoPartFirst - If V is a value that satisfies isSOImmTwoPartVal, return the first chunk of it.
 
unsigned getSOImmTwoPartSecond (unsigned V)
 getSOImmTwoPartSecond - If V is a value that satisfies isSOImmTwoPartVal, return the second chunk of it.
 
bool isSOImmTwoPartValNeg (unsigned V)
 isSOImmTwoPartValNeg - Return true if the specified value can be obtained by two SOImmVal, that -V = First + Second.
 
unsigned getThumbImmValShift (unsigned Imm)
 getThumbImmValShift - Try to handle Imm with a 8-bit immediate followed by a left shift.
 
bool isThumbImmShiftedVal (unsigned V)
 isThumbImmShiftedVal - Return true if the specified value can be obtained by left shifting a 8-bit immediate.
 
unsigned getThumbImm16ValShift (unsigned Imm)
 getThumbImm16ValShift - Try to handle Imm with a 16-bit immediate followed by a left shift.
 
bool isThumbImm16ShiftedVal (unsigned V)
 isThumbImm16ShiftedVal - Return true if the specified value can be obtained by left shifting a 16-bit immediate.
 
unsigned getThumbImmNonShiftedVal (unsigned V)
 getThumbImmNonShiftedVal - If V is a value that satisfies isThumbImmShiftedVal, return the non-shiftd value.
 
int getT2SOImmValSplatVal (unsigned V)
 getT2SOImmValSplat - Return the 12-bit encoded representation if the specified value can be obtained by splatting the low 8 bits into every other byte or every byte of a 32-bit value.
 
int getT2SOImmValRotateVal (unsigned V)
 getT2SOImmValRotateVal - Return the 12-bit encoded representation if the specified value is a rotated 8-bit value.
 
int getT2SOImmVal (unsigned Arg)
 getT2SOImmVal - Given a 32-bit immediate, if it is something that can fit into a Thumb-2 shifter_operand immediate operand, return the 12-bit encoding for it.
 
unsigned getT2SOImmValRotate (unsigned V)
 
bool isT2SOImmTwoPartVal (unsigned Imm)
 
unsigned getT2SOImmTwoPartFirst (unsigned Imm)
 
unsigned getT2SOImmTwoPartSecond (unsigned Imm)
 
unsigned getAM2Opc (AddrOpc Opc, unsigned Imm12, ShiftOpc SO, unsigned IdxMode=0)
 
unsigned getAM2Offset (unsigned AM2Opc)
 
AddrOpc getAM2Op (unsigned AM2Opc)
 
ShiftOpc getAM2ShiftOpc (unsigned AM2Opc)
 
unsigned getAM2IdxMode (unsigned AM2Opc)
 
unsigned getAM3Opc (AddrOpc Opc, unsigned char Offset, unsigned IdxMode=0)
 getAM3Opc - This function encodes the addrmode3 opc field.
 
unsigned char getAM3Offset (unsigned AM3Opc)
 
AddrOpc getAM3Op (unsigned AM3Opc)
 
unsigned getAM3IdxMode (unsigned AM3Opc)
 
AMSubMode getAM4SubMode (unsigned Mode)
 
unsigned getAM4ModeImm (AMSubMode SubMode)
 
unsigned getAM5Opc (AddrOpc Opc, unsigned char Offset)
 getAM5Opc - This function encodes the addrmode5 opc field.
 
unsigned char getAM5Offset (unsigned AM5Opc)
 
AddrOpc getAM5Op (unsigned AM5Opc)
 
unsigned getAM5FP16Opc (AddrOpc Opc, unsigned char Offset)
 getAM5FP16Opc - This function encodes the addrmode5fp16 opc field.
 
unsigned char getAM5FP16Offset (unsigned AM5Opc)
 
AddrOpc getAM5FP16Op (unsigned AM5Opc)
 
unsigned createVMOVModImm (unsigned OpCmode, unsigned Val)
 
unsigned getVMOVModImmOpCmode (unsigned ModImm)
 
unsigned getVMOVModImmVal (unsigned ModImm)
 
uint64_t decodeVMOVModImm (unsigned ModImm, unsigned &EltBits)
 decodeVMOVModImm - Decode a NEON/MVE modified immediate value into the element value and the element size in bits.
 
bool isNEONBytesplat (unsigned Value, unsigned Size)
 
bool isNEONi16splat (unsigned Value)
 Checks if Value is a correct immediate for instructions like VBIC/VORR.
 
unsigned encodeNEONi16splat (unsigned Value)
 
bool isNEONi32splat (unsigned Value)
 Checks if Value is a correct immediate for instructions like VBIC/VORR.
 
unsigned encodeNEONi32splat (unsigned Value)
 Encode NEON 32 bits Splat immediate for instructions like VBIC/VORR.
 
float getFPImmFloat (unsigned Imm)
 
int getFP16Imm (const APInt &Imm)
 getFP16Imm - Return an 8-bit floating-point version of the 16-bit floating-point value.
 
int getFP16Imm (const APFloat &FPImm)
 
int getFP32FP16Imm (const APInt &Imm)
 If this is a FP16Imm encoded as a fp32 value, return the 8-bit encoding for it.
 
int getFP32FP16Imm (const APFloat &FPImm)
 
int getFP32Imm (const APInt &Imm)
 getFP32Imm - Return an 8-bit floating-point version of the 32-bit floating-point value.
 
int getFP32Imm (const APFloat &FPImm)
 
int getFP64Imm (const APInt &Imm)
 getFP64Imm - Return an 8-bit floating-point version of the 64-bit floating-point value.
 
int getFP64Imm (const APFloat &FPImm)
 

Detailed Description

ARM_AM - ARM Addressing Mode Stuff.

Enumeration Type Documentation

◆ AddrOpc

Enumerator
sub 
add 

Definition at line 37 of file ARMAddressingModes.h.

◆ AMSubMode

Enumerator
bad_am_submode 
ia 
ib 
da 
db 

Definition at line 66 of file ARMAddressingModes.h.

◆ ShiftOpc

Enumerator
no_shift 
asr 
lsl 
lsr 
ror 
rrx 
uxtw 

Definition at line 27 of file ARMAddressingModes.h.

Function Documentation

◆ createVMOVModImm()

unsigned llvm::ARM_AM::createVMOVModImm ( unsigned  OpCmode,
unsigned  Val 
)
inline

Definition at line 533 of file ARMAddressingModes.h.

Referenced by isVMOVModifiedImm(), and PromoteMVEPredVector().

◆ decodeVMOVModImm()

uint64_t llvm::ARM_AM::decodeVMOVModImm ( unsigned  ModImm,
unsigned EltBits 
)
inline

decodeVMOVModImm - Decode a NEON/MVE modified immediate value into the element value and the element size in bits.

(If the element size is smaller than the vector, it is splatted into all the elements.)

Definition at line 544 of file ARMAddressingModes.h.

References getVMOVModImmOpCmode(), getVMOVModImmVal(), and llvm_unreachable.

Referenced by PerformVDUPLANECombine(), llvm::ARMInstPrinter::printVMOVModImmOperand(), and llvm::ARMTargetLowering::SimplifyDemandedBitsForTargetNode().

◆ encodeNEONi16splat()

unsigned llvm::ARM_AM::encodeNEONi16splat ( unsigned  Value)
inline

Definition at line 601 of file ARMAddressingModes.h.

References assert(), and isNEONi16splat().

◆ encodeNEONi32splat()

unsigned llvm::ARM_AM::encodeNEONi32splat ( unsigned  Value)
inline

Encode NEON 32 bits Splat immediate for instructions like VBIC/VORR.

Definition at line 617 of file ARMAddressingModes.h.

References assert(), and isNEONi32splat().

◆ getAddrOpcStr()

const char * llvm::ARM_AM::getAddrOpcStr ( AddrOpc  Op)
inline

◆ getAM2IdxMode()

unsigned llvm::ARM_AM::getAM2IdxMode ( unsigned  AM2Opc)
inline

Definition at line 415 of file ARMAddressingModes.h.

Referenced by llvm::ARMInstPrinter::printAddrMode2Operand().

◆ getAM2Offset()

unsigned llvm::ARM_AM::getAM2Offset ( unsigned  AM2Opc)
inline

◆ getAM2Op()

AddrOpc llvm::ARM_AM::getAM2Op ( unsigned  AM2Opc)
inline

◆ getAM2Opc()

unsigned llvm::ARM_AM::getAM2Opc ( AddrOpc  Opc,
unsigned  Imm12,
ShiftOpc  SO,
unsigned  IdxMode = 0 
)
inline

Definition at line 400 of file ARMAddressingModes.h.

References assert(), and sub.

Referenced by DecodeAddrMode2IdxInstruction(), and DecodeSORegMemOperand().

◆ getAM2ShiftOpc()

ShiftOpc llvm::ARM_AM::getAM2ShiftOpc ( unsigned  AM2Opc)
inline

◆ getAM3IdxMode()

unsigned llvm::ARM_AM::getAM3IdxMode ( unsigned  AM3Opc)
inline

Definition at line 441 of file ARMAddressingModes.h.

Referenced by llvm::ARMInstPrinter::printAddrMode3Operand().

◆ getAM3Offset()

unsigned char llvm::ARM_AM::getAM3Offset ( unsigned  AM3Opc)
inline

◆ getAM3Op()

AddrOpc llvm::ARM_AM::getAM3Op ( unsigned  AM3Opc)
inline

◆ getAM3Opc()

unsigned llvm::ARM_AM::getAM3Opc ( AddrOpc  Opc,
unsigned char  Offset,
unsigned  IdxMode = 0 
)
inline

getAM3Opc - This function encodes the addrmode3 opc field.

Definition at line 432 of file ARMAddressingModes.h.

References llvm::Offset, and sub.

◆ getAM4ModeImm()

unsigned llvm::ARM_AM::getAM4ModeImm ( AMSubMode  SubMode)
inline

Definition at line 462 of file ARMAddressingModes.h.

◆ getAM4SubMode()

AMSubMode llvm::ARM_AM::getAM4SubMode ( unsigned  Mode)
inline

Definition at line 458 of file ARMAddressingModes.h.

References Mode.

Referenced by llvm::ARMInstPrinter::printLdStmModeOperand().

◆ getAM5FP16Offset()

unsigned char llvm::ARM_AM::getAM5FP16Offset ( unsigned  AM5Opc)
inline

◆ getAM5FP16Op()

AddrOpc llvm::ARM_AM::getAM5FP16Op ( unsigned  AM5Opc)
inline

◆ getAM5FP16Opc()

unsigned llvm::ARM_AM::getAM5FP16Opc ( AddrOpc  Opc,
unsigned char  Offset 
)
inline

getAM5FP16Opc - This function encodes the addrmode5fp16 opc field.

Definition at line 497 of file ARMAddressingModes.h.

References llvm::Offset, and sub.

Referenced by DecodeAddrMode5FP16Operand().

◆ getAM5Offset()

unsigned char llvm::ARM_AM::getAM5Offset ( unsigned  AM5Opc)
inline

◆ getAM5Op()

AddrOpc llvm::ARM_AM::getAM5Op ( unsigned  AM5Opc)
inline

◆ getAM5Opc()

unsigned llvm::ARM_AM::getAM5Opc ( AddrOpc  Opc,
unsigned char  Offset 
)
inline

getAM5Opc - This function encodes the addrmode5 opc field.

Definition at line 476 of file ARMAddressingModes.h.

References llvm::Offset, and sub.

Referenced by DecodeAddrMode5Operand(), and DecodeCopMemInstruction().

◆ getAMSubModeStr()

const char * llvm::ARM_AM::getAMSubModeStr ( AMSubMode  Mode)
inline

Definition at line 74 of file ARMAddressingModes.h.

References da, db, ia, ib, llvm_unreachable, and Mode.

Referenced by llvm::ARMInstPrinter::printLdStmModeOperand().

◆ getFP16Imm() [1/2]

int llvm::ARM_AM::getFP16Imm ( const APFloat FPImm)
inline

Definition at line 673 of file ARMAddressingModes.h.

References llvm::APFloat::bitcastToAPInt(), and getFP16Imm().

◆ getFP16Imm() [2/2]

int llvm::ARM_AM::getFP16Imm ( const APInt Imm)
inline

getFP16Imm - Return an 8-bit floating-point version of the 16-bit floating-point value.

If the value cannot be represented as an 8-bit floating-point value, then return -1.

Definition at line 654 of file ARMAddressingModes.h.

Referenced by getFP16Imm(), getFP32FP16Imm(), and llvm::ARMTargetLowering::isFPImmLegal().

◆ getFP32FP16Imm() [1/2]

int llvm::ARM_AM::getFP32FP16Imm ( const APFloat FPImm)
inline

Definition at line 685 of file ARMAddressingModes.h.

References llvm::APFloat::bitcastToAPInt(), and getFP32FP16Imm().

◆ getFP32FP16Imm() [2/2]

int llvm::ARM_AM::getFP32FP16Imm ( const APInt Imm)
inline

If this is a FP16Imm encoded as a fp32 value, return the 8-bit encoding for it.

Otherwise return -1 like getFP16Imm.

Definition at line 679 of file ARMAddressingModes.h.

References getFP16Imm().

Referenced by getFP32FP16Imm(), and llvm::ARMTargetLowering::isFPImmLegal().

◆ getFP32Imm() [1/2]

int llvm::ARM_AM::getFP32Imm ( const APFloat FPImm)
inline

Definition at line 713 of file ARMAddressingModes.h.

References llvm::APFloat::bitcastToAPInt(), and getFP32Imm().

◆ getFP32Imm() [2/2]

int llvm::ARM_AM::getFP32Imm ( const APInt Imm)
inline

getFP32Imm - Return an 8-bit floating-point version of the 32-bit floating-point value.

If the value cannot be represented as an 8-bit floating-point value, then return -1.

Definition at line 692 of file ARMAddressingModes.h.

Referenced by getFP32Imm(), and llvm::ARMTargetLowering::isFPImmLegal().

◆ getFP64Imm() [1/2]

int llvm::ARM_AM::getFP64Imm ( const APFloat FPImm)
inline

Definition at line 741 of file ARMAddressingModes.h.

References llvm::APFloat::bitcastToAPInt(), and getFP64Imm().

◆ getFP64Imm() [2/2]

int llvm::ARM_AM::getFP64Imm ( const APInt Imm)
inline

getFP64Imm - Return an 8-bit floating-point version of the 64-bit floating-point value.

If the value cannot be represented as an 8-bit floating-point value, then return -1.

Definition at line 720 of file ARMAddressingModes.h.

Referenced by getFP64Imm(), and llvm::ARMTargetLowering::isFPImmLegal().

◆ getFPImmFloat()

float llvm::ARM_AM::getFPImmFloat ( unsigned  Imm)
inline

Definition at line 631 of file ARMAddressingModes.h.

References I.

Referenced by llvm::ARMInstPrinter::printFPImmOperand().

◆ getShiftOpcEncoding()

unsigned llvm::ARM_AM::getShiftOpcEncoding ( ShiftOpc  Op)
inline

Definition at line 56 of file ARMAddressingModes.h.

References asr, llvm_unreachable, lsl, lsr, and ror.

◆ getShiftOpcForNode()

static ShiftOpc llvm::ARM_AM::getShiftOpcForNode ( unsigned  Opcode)
inlinestatic

◆ getShiftOpcStr()

const StringRef llvm::ARM_AM::getShiftOpcStr ( ShiftOpc  Op)
inline

◆ getSOImmTwoPartFirst()

unsigned llvm::ARM_AM::getSOImmTwoPartFirst ( unsigned  V)
inline

getSOImmTwoPartFirst - If V is a value that satisfies isSOImmTwoPartVal, return the first chunk of it.

Definition at line 179 of file ARMAddressingModes.h.

References getSOImmValRotate().

Referenced by llvm::ARMBaseInstrInfo::foldImmediate(), and isSOImmTwoPartValNeg().

◆ getSOImmTwoPartSecond()

unsigned llvm::ARM_AM::getSOImmTwoPartSecond ( unsigned  V)
inline

getSOImmTwoPartSecond - If V is a value that satisfies isSOImmTwoPartVal, return the second chunk of it.

Definition at line 185 of file ARMAddressingModes.h.

References assert(), and getSOImmValRotate().

Referenced by llvm::ARMBaseInstrInfo::foldImmediate().

◆ getSOImmVal()

int llvm::ARM_AM::getSOImmVal ( unsigned  Arg)
inline

◆ getSOImmValImm()

unsigned llvm::ARM_AM::getSOImmValImm ( unsigned  Imm)
inline

getSOImmValImm - Given an encoded imm field for the reg/imm form, return the 8-bit imm value.

Definition at line 106 of file ARMAddressingModes.h.

◆ getSOImmValRot()

unsigned llvm::ARM_AM::getSOImmValRot ( unsigned  Imm)
inline

getSOImmValRot - Given an encoded imm field for the reg/imm form, return the rotate amount.

Definition at line 109 of file ARMAddressingModes.h.

◆ getSOImmValRotate()

unsigned llvm::ARM_AM::getSOImmValRotate ( unsigned  Imm)
inline

getSOImmValRotate - Try to handle Imm with an immediate shifter operand, computing the rotate amount to use.

If this immediate value cannot be handled with a single shifter-op, determine a good rotate amount that will take a maximal chunk of bits out of the immediate.

Definition at line 115 of file ARMAddressingModes.h.

References llvm::countr_zero().

Referenced by llvm::emitARMRegPlusImmediate(), getSOImmTwoPartFirst(), getSOImmTwoPartSecond(), getSOImmVal(), isSOImmTwoPartVal(), isSOImmTwoPartValNeg(), and llvm::rewriteARMFrameIndex().

◆ getSORegOffset()

unsigned llvm::ARM_AM::getSORegOffset ( unsigned  Op)
inline

◆ getSORegOpc()

unsigned llvm::ARM_AM::getSORegOpc ( ShiftOpc  ShOp,
unsigned  Imm 
)
inline

◆ getSORegShOp()

ShiftOpc llvm::ARM_AM::getSORegShOp ( unsigned  Op)
inline

◆ getT2SOImmTwoPartFirst()

unsigned llvm::ARM_AM::getT2SOImmTwoPartFirst ( unsigned  Imm)
inline

◆ getT2SOImmTwoPartSecond()

unsigned llvm::ARM_AM::getT2SOImmTwoPartSecond ( unsigned  Imm)
inline

◆ getT2SOImmVal()

int llvm::ARM_AM::getT2SOImmVal ( unsigned  Arg)
inline

◆ getT2SOImmValRotate()

unsigned llvm::ARM_AM::getT2SOImmValRotate ( unsigned  V)
inline

Definition at line 321 of file ARMAddressingModes.h.

References llvm::countr_zero().

Referenced by getT2SOImmTwoPartFirst(), and isT2SOImmTwoPartVal().

◆ getT2SOImmValRotateVal()

int llvm::ARM_AM::getT2SOImmValRotateVal ( unsigned  V)
inline

getT2SOImmValRotateVal - Return the 12-bit encoded representation if the specified value is a rotated 8-bit value.

Return -1 if no rotation encoding is possible. See ARM Reference Manual A6.3.2.

Definition at line 290 of file ARMAddressingModes.h.

References llvm::countl_zero().

Referenced by getT2SOImmVal().

◆ getT2SOImmValSplatVal()

int llvm::ARM_AM::getT2SOImmValSplatVal ( unsigned  V)
inline

getT2SOImmValSplat - Return the 12-bit encoded representation if the specified value can be obtained by splatting the low 8 bits into every other byte or every byte of a 32-bit value.

i.e., 00000000 00000000 00000000 abcdefgh control = 0 00000000 abcdefgh 00000000 abcdefgh control = 1 abcdefgh 00000000 abcdefgh 00000000 control = 2 abcdefgh abcdefgh abcdefgh abcdefgh control = 3 Return -1 if none of the above apply. See ARM Reference Manual A6.3.2.

Definition at line 262 of file ARMAddressingModes.h.

Referenced by getT2SOImmTwoPartFirst(), getT2SOImmVal(), and isT2SOImmTwoPartVal().

◆ getThumbImm16ValShift()

unsigned llvm::ARM_AM::getThumbImm16ValShift ( unsigned  Imm)
inline

getThumbImm16ValShift - Try to handle Imm with a 16-bit immediate followed by a left shift.

Returns the shift amount to use.

Definition at line 229 of file ARMAddressingModes.h.

References llvm::countr_zero().

Referenced by isThumbImm16ShiftedVal().

◆ getThumbImmNonShiftedVal()

unsigned llvm::ARM_AM::getThumbImmNonShiftedVal ( unsigned  V)
inline

getThumbImmNonShiftedVal - If V is a value that satisfies isThumbImmShiftedVal, return the non-shiftd value.

Definition at line 248 of file ARMAddressingModes.h.

References getThumbImmValShift().

◆ getThumbImmValShift()

unsigned llvm::ARM_AM::getThumbImmValShift ( unsigned  Imm)
inline

getThumbImmValShift - Try to handle Imm with a 8-bit immediate followed by a left shift.

Returns the shift amount to use.

Definition at line 210 of file ARMAddressingModes.h.

References llvm::countr_zero().

Referenced by getThumbImmNonShiftedVal(), and isThumbImmShiftedVal().

◆ getVMOVModImmOpCmode()

unsigned llvm::ARM_AM::getVMOVModImmOpCmode ( unsigned  ModImm)
inline

Definition at line 536 of file ARMAddressingModes.h.

Referenced by decodeVMOVModImm().

◆ getVMOVModImmVal()

unsigned llvm::ARM_AM::getVMOVModImmVal ( unsigned  ModImm)
inline

Definition at line 539 of file ARMAddressingModes.h.

Referenced by decodeVMOVModImm().

◆ isNEONBytesplat()

bool llvm::ARM_AM::isNEONBytesplat ( unsigned  Value,
unsigned  Size 
)
inline

Definition at line 582 of file ARMAddressingModes.h.

References assert(), llvm::count(), and Size.

Referenced by isNEONi16splat(), and isNEONi32splat().

◆ isNEONi16splat()

bool llvm::ARM_AM::isNEONi16splat ( unsigned  Value)
inline

Checks if Value is a correct immediate for instructions like VBIC/VORR.

Definition at line 593 of file ARMAddressingModes.h.

References isNEONBytesplat().

Referenced by encodeNEONi16splat().

◆ isNEONi32splat()

bool llvm::ARM_AM::isNEONi32splat ( unsigned  Value)
inline

Checks if Value is a correct immediate for instructions like VBIC/VORR.

Definition at line 611 of file ARMAddressingModes.h.

References isNEONBytesplat().

Referenced by encodeNEONi32splat().

◆ isSOImmTwoPartVal()

bool llvm::ARM_AM::isSOImmTwoPartVal ( unsigned  V)
inline

isSOImmTwoPartVal - Return true if the specified value can be obtained by or'ing together two SOImmVal's.

Definition at line 166 of file ARMAddressingModes.h.

References getSOImmValRotate().

Referenced by llvm::ConstantMaterializationCost(), llvm::ARMBaseInstrInfo::foldImmediate(), and isSOImmTwoPartValNeg().

◆ isSOImmTwoPartValNeg()

bool llvm::ARM_AM::isSOImmTwoPartValNeg ( unsigned  V)
inline

isSOImmTwoPartValNeg - Return true if the specified value can be obtained by two SOImmVal, that -V = First + Second.

"R+V" can be optimized to (sub (sub R, First), Second). "R=V" can be optimized to (sub (mvn R, ~(-First)), Second).

Definition at line 198 of file ARMAddressingModes.h.

References llvm::First, getSOImmTwoPartFirst(), getSOImmValRotate(), and isSOImmTwoPartVal().

Referenced by llvm::ConstantMaterializationCost().

◆ isT2SOImmTwoPartVal()

bool llvm::ARM_AM::isT2SOImmTwoPartVal ( unsigned  Imm)
inline

◆ isThumbImm16ShiftedVal()

bool llvm::ARM_AM::isThumbImm16ShiftedVal ( unsigned  V)
inline

isThumbImm16ShiftedVal - Return true if the specified value can be obtained by left shifting a 16-bit immediate.

Definition at line 240 of file ARMAddressingModes.h.

References getThumbImm16ValShift().

◆ isThumbImmShiftedVal()

bool llvm::ARM_AM::isThumbImmShiftedVal ( unsigned  V)
inline

isThumbImmShiftedVal - Return true if the specified value can be obtained by left shifting a 8-bit immediate.

Definition at line 221 of file ARMAddressingModes.h.

References getThumbImmValShift().

Referenced by llvm::ConstantMaterializationCost(), llvm::ARMTTIImpl::getIntImmCost(), and llvm::ARMTargetLowering::LowerAsmOperandForConstraint().