Skip to content

Commit 3a5187a

Browse files
tests: Do not run afoul of asm.validity.non-exhaustive in input-stats
1 parent 8a407a8 commit 3a5187a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/ui/stats/input-stats.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ check-pass
22
//@ compile-flags: -Zinput-stats
33
//@ only-64bit
4+
//@ needs-asm-support
45
// layout randomization affects the hir stat output
56
//@ needs-deterministic-layouts
67
//
@@ -49,5 +50,7 @@ fn main() {
4950
_ => {}
5051
}
5152

52-
unsafe { asm!("mov rdi, 1"); }
53+
// NOTE(workingjubilee): do GPUs support NOPs? remove this cfg if they do
54+
#[cfg(not(any(target_arch = "nvptx64", target_arch = "spirv", target_arch = "amdgpu")))]
55+
unsafe { asm!("nop"); }
5356
}

0 commit comments

Comments
 (0)