[llvm] [SandboxIR] Implement AddrSpaceCastInst (PR #101260)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 08:13:16 PDT 2024


================
@@ -1411,6 +1413,43 @@ class BitCastInst : public CastInst {
 #endif
 };
 
+class AddrSpaceCastInst : public CastInst {
+public:
+  static Value *create(Value *Src, Type *DestTy, BBIterator WhereIt,
+                       BasicBlock *WhereBB, Context &Ctx,
+                       const Twine &Name = "");
+  static Value *create(Value *Src, Type *DestTy, Instruction *InsertBefore,
+                       Context &Ctx, const Twine &Name = "");
+  static Value *create(Value *Src, Type *DestTy, BasicBlock *InsertAtEnd,
+                       Context &Ctx, const Twine &Name = "");
+
+  static bool classof(const Value *From) {
+    if (auto *I = dyn_cast<Instruction>(From))
+      return cast<Instruction>(From)->getOpcode() == Opcode::AddrSpaceCast;
----------------
vporpo wrote:

Oops good catch.

https://github.com/llvm/llvm-project/pull/101260


More information about the llvm-commits mailing list