[llvm] [SPIRV] Implement handle_fromBinding intrinsic. (PR #111052)
Steven Perron via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 07:25:34 PDT 2024
================
@@ -44,6 +44,18 @@ using ExtInstList =
namespace {
+uint64_t getUnsignedConstantValueFromReg(llvm::Register Reg,
+ const llvm::MachineRegisterInfo &MRI) {
+ llvm::SPIRVType *ConstTy = MRI.getVRegDef(Reg);
+ assert(ConstTy && ConstTy->getOpcode() == llvm::SPIRV::ASSIGN_TYPE &&
+ ConstTy->getOperand(1).isReg());
----------------
s-perron wrote:
Actually, I went looking more into the file and found an existing function that does what I want `foldImm`. I replaced all uses of my new function with a call to that function.
https://github.com/llvm/llvm-project/pull/111052
More information about the llvm-commits
mailing list