17#include "llvm/IR/IntrinsicsSPIRV.h"
25 Value *Val,
StringRef Constraint, std::vector<MachineOperand> &Ops,
27 Value *ValOp =
nullptr;
28 if (isa<ConstantInt>(Val)) {
30 }
else if (
ConstantFP *CFP = dyn_cast<ConstantFP>(Val)) {
33 }
else if (
auto *
II = dyn_cast<IntrinsicInst>(Val)) {
34 if (
II->getIntrinsicID() == Intrinsic::spv_track_constant) {
35 if (isa<ConstantInt>(
II->getOperand(0))) {
36 ValOp =
II->getOperand(0);
37 }
else if (
ConstantFP *CFP = dyn_cast<ConstantFP>(
II->getOperand(0))) {
44 ValOp, Constraint, Ops, MIRBuilder)
uint64_t IntrinsicInst * II
ConstantFP - Floating Point Values [float, double].
virtual bool lowerAsmOperandForConstraint(Value *Val, StringRef Constraint, std::vector< MachineOperand > &Ops, MachineIRBuilder &MIRBuilder) const
Lower the specified operand into the Ops vector.
Helper class to build MachineInstr.
static MachineOperand CreateFPImm(const ConstantFP *CFP)
SPIRVInlineAsmLowering(const SPIRVTargetLowering &TLI)
bool lowerAsmOperandForConstraint(Value *Val, StringRef Constraint, std::vector< MachineOperand > &Ops, MachineIRBuilder &MIRBuilder) const override
Lower the specified operand into the Ops vector.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.