box fty fval = do
  let ty = primTy (ftyToTy fty)
  val <- if isHeapFTy fty then alloc ty else allocAtomic ty
  tagptr <- inst $ GetElementPtr True val [ConstantOperand (C.Int 32 0), ConstantOperand (C.Int 32 0)] []
  valptr <- inst $ GetElementPtr True val [ConstantOperand (C.Int 32 0), ConstantOperand (C.Int 32 1)] []
  inst' $ Store False tagptr (ConstantOperand (C.Int 32 (-1))) Nothing 0 []
  inst' $ Store False valptr fval Nothing 0 []
  ptrI8 <- inst $ BitCast val (PointerType (IntegerType 8) (AddrSpace 0)) []
  inst' $ simpleCall "llvm.invariant.start" [ConstantOperand $ C.Int 64 (-1), ptrI8]
  inst $ BitCast val (PointerType valueType (AddrSpace 0)) []
box fty fval = do
  let ty = primTy (ftyToTy fty)
  val <- if isHeapFTy fty then alloc ty else allocAtomic ty
  tagptr <- inst $ GetElementPtr True val [ConstantOperand (C.Int 32 0), ConstantOperand (C.Int 32 0)] []
  valptr <- inst $ GetElementPtr True val [ConstantOperand (C.Int 32 0), ConstantOperand (C.Int 32 1)] []
  inst' $ Store False tagptr (ConstantOperand (C.Int 32 (-1))) Nothing 0 []
  inst' $ Store False valptr fval Nothing 0 []
  ptrI8 <- inst $ BitCast val (PointerType (IntegerType 8) (AddrSpace 0)) []
  inst' $ simpleCall "llvm.invariant.start" [ConstantOperand $ C.Int 64 (-1), ptrI8]
  inst $ BitCast val (PointerType valueType (AddrSpace 0)) []
box fty fval = do
  let ty = primTy (ftyToTy fty)
  val <- if isHeapFTy fty then alloc ty else allocAtomic ty
  tagptr <- inst $ GetElementPtr True val [ConstantOperand (C.Int 32 0), ConstantOperand (C.Int 32 0)] []
  valptr <- inst $ GetElementPtr True val [ConstantOperand (C.Int 32 0), ConstantOperand (C.Int 32 1)] []
  inst' $ Store False tagptr (ConstantOperand (C.Int 32 (-1))) Nothing 0 []
  inst' $ Store False valptr fval Nothing 0 []
  ptrI8 <- inst $ BitCast val (PointerType (IntegerType 8) (AddrSpace 0)) []
  inst' $ simpleCall "llvm.invariant.start" [ConstantOperand $ C.Int 64 (-1), ptrI8]
  inst $ BitCast val (PointerType valueType (AddrSpace 0)) []