addrSpaceCastIsValid nvptx

This commit is contained in:
Guillaume Wenzek 2022-10-01 15:51:45 +02:00 committed by Andrew Kelley
parent aad983cf40
commit 577f0aa54b

View File

@ -655,7 +655,7 @@ pub fn addrSpaceCastIsValid(
const arch = target.cpu.arch;
switch (arch) {
.x86_64, .i386 => return arch.supportsAddressSpace(from) and arch.supportsAddressSpace(to),
.amdgcn => {
.nvptx64, .nvptx, .amdgcn => {
const to_generic = arch.supportsAddressSpace(from) and to == .generic;
const from_generic = arch.supportsAddressSpace(to) and from == .generic;
return to_generic or from_generic;