Skip to content

Commit 07826e8

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

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
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 = "amdgpu")))]
55+
unsafe { asm!("nop"); }
5356
}

tests/ui/stats/input-stats.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ ast-stats Arm 96 (NN.N%) 2 48
1313
ast-stats Local 96 (NN.N%) 1 96
1414
ast-stats FnDecl 120 (NN.N%) 5 24
1515
ast-stats InlineAsm 120 (NN.N%) 1 120
16-
ast-stats Attribute 128 (NN.N%) 4 32
16+
ast-stats Attribute 160 (NN.N%) 5 32
1717
ast-stats - DocComment 32 (NN.N%) 1
18-
ast-stats - Normal 96 (NN.N%) 3
18+
ast-stats - Normal 128 (NN.N%) 4
1919
ast-stats Param 160 (NN.N%) 4 40
2020
ast-stats Stmt 160 (NN.N%) 5 32
2121
ast-stats - Let 32 (NN.N%) 1
@@ -41,7 +41,7 @@ ast-stats - Path 72 (NN.N%) 1
4141
ast-stats - Struct 72 (NN.N%) 1
4242
ast-stats - Lit 144 (NN.N%) 2
4343
ast-stats - Block 216 (NN.N%) 3
44-
ast-stats PathSegment 864 (NN.N%) 36 24
44+
ast-stats PathSegment 888 (NN.N%) 37 24
4545
ast-stats Ty 896 (NN.N%) 14 64
4646
ast-stats - Ptr 64 (NN.N%) 1
4747
ast-stats - Ref 64 (NN.N%) 1
@@ -56,7 +56,7 @@ ast-stats - Trait 144 (NN.N%) 1
5656
ast-stats - Fn 288 (NN.N%) 2
5757
ast-stats - Use 576 (NN.N%) 4
5858
ast-stats ----------------------------------------------------------------
59-
ast-stats Total 7_416 127
59+
ast-stats Total 7_472 129
6060
ast-stats
6161
hir-stats HIR STATS
6262
hir-stats Name Accumulated Size Count Item Size
@@ -82,10 +82,10 @@ hir-stats - Expr 32 (NN.N%) 1
8282
hir-stats - Let 32 (NN.N%) 1
8383
hir-stats - Semi 32 (NN.N%) 1
8484
hir-stats FnDecl 120 (NN.N%) 3 40
85-
hir-stats Attribute 128 (NN.N%) 4 32
8685
hir-stats FieldDef 128 (NN.N%) 2 64
8786
hir-stats GenericArgs 144 (NN.N%) 3 48
8887
hir-stats Variant 144 (NN.N%) 2 72
88+
hir-stats Attribute 160 (NN.N%) 5 32
8989
hir-stats GenericBound 256 (NN.N%) 4 64
9090
hir-stats - Trait 256 (NN.N%) 4
9191
hir-stats Block 288 (NN.N%) 6 48
@@ -117,5 +117,5 @@ hir-stats - Use 352 (NN.N%) 4
117117
hir-stats Path 1_040 (NN.N%) 26 40
118118
hir-stats PathSegment 1_776 (NN.N%) 37 48
119119
hir-stats ----------------------------------------------------------------
120-
hir-stats Total 8_644 172
120+
hir-stats Total 8_676 173
121121
hir-stats

0 commit comments

Comments
 (0)