tests: rustfmt all the tests that had e.g. // only-spirt removed.

This commit is contained in:
Eduard-Mihai Burtescu 2023-04-24 15:18:20 +03:00 committed by Eduard-Mihai Burtescu
parent 6b49cb1d51
commit 34e58aa01f
43 changed files with 35 additions and 88 deletions

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C target-feature=+VulkanMemoryModelDeviceScopeKHR,+ext:SPV_KHR_vulkan_memory_model
// compile-flags: -C llvm-args=--disassemble-fn=all_memory_barrier::all_memory_barrier

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C target-feature=+VulkanMemoryModelDeviceScopeKHR,+ext:SPV_KHR_vulkan_memory_model
// compile-flags: -C llvm-args=--disassemble-fn=all_memory_barrier_with_group_sync::all_memory_barrier_with_group_sync

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C target-feature=+VulkanMemoryModelDeviceScopeKHR,+ext:SPV_KHR_vulkan_memory_model
// compile-flags: -C llvm-args=--disassemble-fn=device_memory_barrier::device_memory_barrier

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C target-feature=+VulkanMemoryModelDeviceScopeKHR,+ext:SPV_KHR_vulkan_memory_model
// compile-flags: -C llvm-args=--disassemble-fn=device_memory_barrier_with_group_sync::device_memory_barrier_with_group_sync

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C llvm-args=--disassemble-fn=workgroup_memory_barrier::workgroup_memory_barrier

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C llvm-args=--disassemble-fn=workgroup_memory_barrier_with_group_sync::workgroup_memory_barrier_with_group_sync

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C llvm-args=--disassemble-fn=add_two_ints::add_two_ints

View File

@ -2,7 +2,7 @@
%4 = OpFunctionParameter %2
%5 = OpFunctionParameter %2
%6 = OpLabel
OpLine %7 9 4
OpLine %7 7 4
%8 = OpIAdd %2 %4 %5
OpNoLine
OpReturnValue %8

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C llvm-args=--disassemble-fn=asm::asm

View File

@ -1,6 +1,6 @@
%1 = OpFunction %2 None %3
%4 = OpLabel
OpLine %5 11 8
OpLine %5 9 8
OpMemoryBarrier %6 %7
OpNoLine
OpReturn

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C llvm-args=--disassemble-fn=asm_add_two_ints::add_two_ints

View File

@ -2,7 +2,7 @@
%4 = OpFunctionParameter %2
%5 = OpFunctionParameter %2
%6 = OpLabel
OpLine %7 12 8
OpLine %7 10 8
%8 = OpIAdd %2 %4 %5
OpNoLine
OpReturnValue %8

View File

@ -1,5 +1,3 @@
#![crate_name = "asm_op_decorate"]
// build-pass

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -Ctarget-feature=+RuntimeDescriptorArray,+ext:SPV_EXT_descriptor_indexing
// compile-flags: -C llvm-args=--disassemble-fn=complex_image_sample_inst::sample_proj_lod

View File

@ -5,7 +5,7 @@
%8 = OpFunctionParameter %9
%10 = OpFunctionParameter %9
%11 = OpLabel
OpLine %12 20 8
OpLine %12 18 8
%13 = OpAccessChain %14 %15 %16
%17 = OpLoad %18 %13
%19 = OpImageSampleProjExplicitLod %2 %17 %4 Grad|ConstOffset %5 %7 %20

View File

@ -1,5 +1,3 @@
#![crate_name = "custom_entry_point"]
// build-pass

View File

@ -1,5 +1,3 @@
// This is a similar setup to the `issue-731` test, but instead of "just" the
// missing copy out of the global (`Input`) `OpVariable`, small enough types
// would fail much earlier (by generating unsupported pointer casts).

View File

@ -1,12 +1,12 @@
%1 = OpFunction %2 None %3
%4 = OpLabel
OpLine %5 15 12
OpLine %5 13 12
%6 = OpLoad %7 %8
OpLine %5 16 4
OpLine %5 14 4
%9 = OpCompositeExtract %10 %6 0
%11 = OpFAdd %10 %9 %12
%13 = OpCompositeInsert %7 %11 %6 0
OpLine %5 17 4
OpLine %5 15 4
OpStore %14 %13
OpNoLine
OpReturn

View File

@ -1,5 +1,3 @@
#![crate_name = "generic_fn_op_name"]
//
// Test that generic functions' `OpName` correctly include generic arguments.

View File

@ -1,5 +1,3 @@
#![crate_name = "index_user_dst"]
// build-pass

View File

@ -1,15 +1,15 @@
%1 = OpFunction %2 None %3
%4 = OpLabel
OpLine %5 11 12
OpLine %5 9 12
%6 = OpAccessChain %7 %8 %9
%10 = OpArrayLength %11 %8 0
OpLine %5 12 21
OpLine %5 10 21
%12 = OpULessThan %13 %9 %10
OpNoLine
OpSelectionMerge %14 None
OpBranchConditional %12 %15 %16
%15 = OpLabel
OpLine %5 12 21
OpLine %5 10 21
%17 = OpInBoundsAccessChain %18 %6 %9
%19 = OpLoad %20 %17
OpNoLine

View File

@ -1,5 +1,3 @@
#![crate_name = "issue_373"]
// Test that returning a single-scalar-field `#[repr(C)] struct` doesn't generate

View File

@ -1,9 +1,9 @@
%1 = OpFunction %2 None %3
%4 = OpLabel
OpLine %5 26 11
OpLine %5 24 11
%6 = OpFunctionCall %7 %8
%9 = OpCompositeExtract %10 %6 0
OpLine %5 26 4
OpLine %5 24 4
OpStore %11 %9
OpNoLine
OpReturn

View File

@ -1,5 +1,3 @@
#![crate_name = "issue_723_output"]
// Test that interface (global) `OpVariable`s mentioned by `OpEntryPoint` don't

View File

@ -1,5 +1,3 @@
// Test that non-immediate (i.e. not one of scalar/scalar-pair/vector) inputs
// get properly copied out of the global (`Input`) `OpVariable` and mutation is
// only ever done on `fn`-local `OpVariable`s, not on the original global.

View File

@ -1,12 +1,12 @@
%1 = OpFunction %2 None %3
%4 = OpLabel
OpLine %5 13 12
OpLine %5 11 12
%6 = OpLoad %7 %8
OpLine %5 14 4
OpLine %5 12 4
%9 = OpCompositeExtract %10 %6 0
%11 = OpFAdd %10 %9 %12
%13 = OpCompositeInsert %7 %11 %6 0
OpLine %5 15 4
OpLine %5 13 4
OpStore %14 %13
OpNoLine
OpReturn

View File

@ -1,5 +1,3 @@
#![crate_name = "non_writable_storage_buffer"]
// Tests that only `&T` (where `T: Freeze`) storage buffers get `NonWritable`.

View File

@ -1,5 +1,3 @@
#![crate_name = "pass_mode_cast_struct"]
// Test that a small enough `struct` doesn't generate unsupported pointer casts.

View File

@ -1,19 +1,19 @@
%1 = OpFunction %2 None %3
%4 = OpLabel
OpLine %5 31 12
OpLine %5 29 12
%6 = OpLoad %7 %8
OpLine %5 32 14
OpLine %5 30 14
%9 = OpFunctionCall %10 %11 %6
OpLine %5 33 15
OpLine %5 31 15
%12 = OpCompositeExtract %13 %9 0
OpLine %5 33 24
OpLine %5 31 24
%14 = OpCompositeExtract %15 %9 1
OpLine %5 33 32
OpLine %5 31 32
%16 = OpCompositeExtract %15 %9 2
OpLine %5 33 23
OpLine %5 31 23
%17 = OpIAdd %15 %14 %16
%18 = OpUConvert %13 %17
OpLine %5 33 4
OpLine %5 31 4
%19 = OpIAdd %13 %12 %18
OpStore %20 %19
OpNoLine

View File

@ -10,19 +10,19 @@ note: used from within `core::intrinsics::copy::<f32>`
2447 | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
| ^
note: called by `ptr_copy::copy_via_raw_ptr`
--> $DIR/ptr_copy.rs:30:18
--> $DIR/ptr_copy.rs:28:18
|
30 | unsafe { core::ptr::copy(src, dst, 1) }
28 | unsafe { core::ptr::copy(src, dst, 1) }
| ^
note: called by `ptr_copy::main`
--> $DIR/ptr_copy.rs:35:5
--> $DIR/ptr_copy.rs:33:5
|
35 | copy_via_raw_ptr(&i, o);
33 | copy_via_raw_ptr(&i, o);
| ^
note: called by `main`
--> $DIR/ptr_copy.rs:33:1
--> $DIR/ptr_copy.rs:31:1
|
33 | #[spirv(fragment)]
31 | #[spirv(fragment)]
| ^
error: aborting due to previous error

View File

@ -1,5 +1,3 @@
// revisions: normal via_intrinsic
//[normal] build-fail
// normalize-stderr-test "\S*/library/core/src/" -> "$$CORE_SRC/"

View File

@ -2,7 +2,7 @@
%4 = OpFunctionParameter %5
%6 = OpFunctionParameter %5
%7 = OpLabel
OpLine %8 19 17
OpLine %8 17 17
OpCopyMemory %6 %4
OpNoLine
OpReturn

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C llvm-args=--disassemble-fn=ptr_read::copy_via_raw_ptr

View File

@ -4,7 +4,7 @@
%7 = OpLabel
OpLine %8 1157 8
%9 = OpLoad %10 %4
OpLine %11 9 13
OpLine %11 7 13
OpStore %6 %9
OpNoLine
OpReturn

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C llvm-args=--disassemble-fn=ptr_read_method::copy_via_raw_ptr

View File

@ -4,7 +4,7 @@
%7 = OpLabel
OpLine %8 1157 8
%9 = OpLoad %10 %4
OpLine %11 9 13
OpLine %11 7 13
OpStore %6 %9
OpNoLine
OpReturn

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C llvm-args=--disassemble-fn=ptr_write::copy_via_raw_ptr

View File

@ -2,7 +2,7 @@
%4 = OpFunctionParameter %5
%6 = OpFunctionParameter %5
%7 = OpLabel
OpLine %8 9 35
OpLine %8 7 35
%9 = OpLoad %10 %4
OpLine %11 1354 8
OpStore %6 %9

View File

@ -1,5 +1,3 @@
// build-pass
// compile-flags: -C llvm-args=--disassemble-fn=ptr_write_method::copy_via_raw_ptr

View File

@ -2,7 +2,7 @@
%4 = OpFunctionParameter %5
%6 = OpFunctionParameter %5
%7 = OpLabel
OpLine %8 9 37
OpLine %8 7 37
%9 = OpLoad %10 %4
OpLine %11 1354 8
OpStore %6 %9

View File

@ -6,7 +6,6 @@
// normalize-stderr-test "38\[%38\]" -> "$$ID[%$$ID]"
use spirv_std::spirv;
struct S {

View File

@ -1,5 +1,3 @@
#![crate_name = "unwrap_or"]
// unwrap_or generates some memory-bools (as u8). Test to make sure they're fused away.

View File

@ -1,6 +1,6 @@
%1 = OpFunction %2 None %3
%4 = OpLabel
OpLine %5 15 11
OpLine %5 13 11
%6 = OpCompositeInsert %7 %8 %9 0
%10 = OpCompositeExtract %11 %6 1
OpLine %12 967 14
@ -24,7 +24,7 @@ OpBranch %26
%28 = OpLabel
OpBranch %26
%26 = OpLabel
OpLine %5 15 4
OpLine %5 13 4
OpStore %29 %24
OpNoLine
OpReturn