19 namespace RISCVMatInt {
29 int64_t Hi20 = ((Val + 0x800) >> 12) & 0xFFFFF;
30 int64_t Lo12 = SignExtend64<12>(Val);
35 if (Lo12 || Hi20 == 0) {
36 unsigned AddiOpc = (Is64Bit && Hi20) ? RISCV::ADDIW : RISCV::ADDI;
42 assert(Is64Bit &&
"Can't emit >32-bit imm for non-RV64 target");
67 int64_t Lo12 = SignExtend64<12>(Val);
68 int64_t Hi52 = (Val + 0x800) >> 12;
70 Hi52 =
SignExtend64(Hi52 >> (ShiftAmount - 12), 64 - ShiftAmount);
This class represents lattice values for constants.
void push_back(const T &Elt)
T findFirstSet(T Val, ZeroBehavior ZB=ZB_Max)
Get the index of the first set bit starting from the least significant bit.
constexpr bool isInt< 32 >(int64_t x)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
constexpr int64_t SignExtend64(uint64_t x)
Sign-extend the number in the bottom B bits of X to a 64-bit integer.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void generateInstSeq(int64_t Val, bool Is64Bit, InstSeq &Res)