about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2025-06-10 21:57:34 -0700
committerJubilee Young <workingjubilee@gmail.com>2025-06-25 13:08:51 -0700
commit233882128bda3d1912d339afeca985637f94485c (patch)
tree11c30ec22b9aadf4eeec0d2c6e487b5013606e65
parent8cf5fad73d4e8f41863ecc3bcfa114eabc951faa (diff)
downloadrust-233882128bda3d1912d339afeca985637f94485c.tar.gz
rust-233882128bda3d1912d339afeca985637f94485c.zip
tests: Do not run afoul of asm.validity.non-exhaustive in input-stats
-rw-r--r--tests/ui/stats/input-stats.rs5
-rw-r--r--tests/ui/stats/input-stats.stderr12
2 files changed, 10 insertions, 7 deletions
diff --git a/tests/ui/stats/input-stats.rs b/tests/ui/stats/input-stats.rs
index e760e2894e3..4e8e25eb736 100644
--- a/tests/ui/stats/input-stats.rs
+++ b/tests/ui/stats/input-stats.rs
@@ -1,6 +1,7 @@
 //@ check-pass
 //@ compile-flags: -Zinput-stats
 //@ only-64bit
+//@ needs-asm-support
 // layout randomization affects the hir stat output
 //@ needs-deterministic-layouts
 //
@@ -49,5 +50,7 @@ fn main() {
         _ => {}
     }
 
-    unsafe { asm!("mov rdi, 1"); }
+    // NOTE(workingjubilee): do GPUs support NOPs? remove this cfg if they do
+    #[cfg(not(any(target_arch = "nvptx64", target_arch = "amdgpu")))]
+    unsafe { asm!("nop"); }
 }
diff --git a/tests/ui/stats/input-stats.stderr b/tests/ui/stats/input-stats.stderr
index b3b8784fa27..eb038bbcaf1 100644
--- a/tests/ui/stats/input-stats.stderr
+++ b/tests/ui/stats/input-stats.stderr
@@ -15,7 +15,7 @@ ast-stats - Ptr                       64 (NN.N%)             1
 ast-stats - Ref                       64 (NN.N%)             1
 ast-stats - ImplicitSelf             128 (NN.N%)             2
 ast-stats - Path                     640 (NN.N%)            10
-ast-stats PathSegment              864 (NN.N%)            36            24
+ast-stats PathSegment              888 (NN.N%)            37            24
 ast-stats Expr                     648 (NN.N%)             9            72
 ast-stats - InlineAsm                 72 (NN.N%)             1
 ast-stats - Match                     72 (NN.N%)             1
@@ -41,9 +41,9 @@ ast-stats - Let                       32 (NN.N%)             1
 ast-stats - Semi                      32 (NN.N%)             1
 ast-stats - Expr                      96 (NN.N%)             3
 ast-stats Param                    160 (NN.N%)             4            40
-ast-stats Attribute                128 (NN.N%)             4            32
+ast-stats Attribute                160 (NN.N%)             5            32
 ast-stats - DocComment                32 (NN.N%)             1
-ast-stats - Normal                    96 (NN.N%)             3
+ast-stats - Normal                   128 (NN.N%)             4
 ast-stats InlineAsm                120 (NN.N%)             1           120
 ast-stats FnDecl                   120 (NN.N%)             5            24
 ast-stats Local                     96 (NN.N%)             1            96
@@ -57,7 +57,7 @@ ast-stats GenericArgs               40 (NN.N%)             1            40
 ast-stats - AngleBracketed            40 (NN.N%)             1
 ast-stats Crate                     40 (NN.N%)             1            40
 ast-stats ----------------------------------------------------------------
-ast-stats Total                  7_416                   127
+ast-stats Total                  7_472                   129
 ast-stats ================================================================
 hir-stats ================================================================
 hir-stats HIR STATS: input_stats
@@ -93,7 +93,7 @@ hir-stats - Binding                  216 (NN.N%)             3
 hir-stats Block                    288 (NN.N%)             6            48
 hir-stats GenericBound             256 (NN.N%)             4            64
 hir-stats - Trait                    256 (NN.N%)             4
-hir-stats Attribute                160 (NN.N%)             4            40
+hir-stats Attribute                200 (NN.N%)             5            40
 hir-stats Variant                  144 (NN.N%)             2            72
 hir-stats GenericArgs              144 (NN.N%)             3            48
 hir-stats FieldDef                 128 (NN.N%)             2            64
@@ -119,5 +119,5 @@ hir-stats Mod                       32 (NN.N%)             1            32
 hir-stats Lifetime                  28 (NN.N%)             1            28
 hir-stats ForeignItemRef            24 (NN.N%)             1            24
 hir-stats ----------------------------------------------------------------
-hir-stats Total                  8_676                   172
+hir-stats Total                  8_716                   173
 hir-stats ================================================================