def METHOD_NAME(self):
    m = ir.Module("test_nvvm_from_llvm")
    m.triple = 'nvptx64-nvidia-cuda'
    nvvm.add_ir_version(m)
    fty = ir.FunctionType(ir.VoidType(), [ir.IntType(32)])
    kernel = ir.Function(m, fty, name='mycudakernel')
    bldr = ir.IRBuilder(kernel.append_basic_block('entry'))
    bldr.ret_void()
    nvvm.set_cuda_kernel(kernel)
    m.data_layout = NVVM().data_layout
    ptx = nvvm.llvm_to_ptx(str(m)).decode('utf8')
    self.assertTrue('mycudakernel' in ptx)
    if is64bit:
        self.assertTrue('.address_size 64' in ptx)
    else:
        self.assertTrue('.address_size 32' in ptx)