summaryrefslogtreecommitdiff
path: root/tests/language-feature/spirv-asm
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-08-28 21:24:49 -0700
committerGitHub <noreply@github.com>2023-08-28 21:24:49 -0700
commitc787c4b82ba76f87069911f203eb192060b5264f (patch)
tree2aa98326ce8d4c9f2011d79ee9f6d34db14716e7 /tests/language-feature/spirv-asm
parentaf363c02bf0fa2502c14f454965adff87170ff15 (diff)
Add `target_switch` and `intrinsic_asm` statement. (#3154)
* Add `target_switch` and `__intrinsic_asm` statement. * Cleanup. * WaveGetActiveMask, WaveGetActiveMask, WaveCountBits. * WaveIsFirstLane. * More wave intrinsics. * wave intrinsics. * merge fix. * Fix. * Fix. * Update test. * update test. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/language-feature/spirv-asm')
-rw-r--r--tests/language-feature/spirv-asm/bad-addr.slang4
-rw-r--r--tests/language-feature/spirv-asm/instructions-at-end.slang2
-rw-r--r--tests/language-feature/spirv-asm/too-many-operands.slang4
-rw-r--r--tests/language-feature/spirv-asm/wrong-assignment-opcode.slang12
4 files changed, 11 insertions, 11 deletions
diff --git a/tests/language-feature/spirv-asm/bad-addr.slang b/tests/language-feature/spirv-asm/bad-addr.slang
index 4fc29a921..422b51655 100644
--- a/tests/language-feature/spirv-asm/bad-addr.slang
+++ b/tests/language-feature/spirv-asm/bad-addr.slang
@@ -11,8 +11,8 @@ int foo(const int constParam)
return spirv_asm
{
OpLoad $$int %foo &buf;
- // CHECK: bad-addr.slang([[#@LINE-1]]): note 29103: unable to take the address of this address-of asm operand
+ // CHECK: bad-addr.slang([[#@LINE-1]]): note {{.*}}: unable to take the address of this address-of asm operand
OpLoad $$int result &constParam;
- // CHECK: bad-addr.slang([[#@LINE-1]]): note 29103: unable to take the address of this address-of asm operand
+ // CHECK: bad-addr.slang([[#@LINE-1]]): note {{.*}}: unable to take the address of this address-of asm operand
};
}
diff --git a/tests/language-feature/spirv-asm/instructions-at-end.slang b/tests/language-feature/spirv-asm/instructions-at-end.slang
index b39fa6da1..75179ea98 100644
--- a/tests/language-feature/spirv-asm/instructions-at-end.slang
+++ b/tests/language-feature/spirv-asm/instructions-at-end.slang
@@ -16,7 +16,7 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
OpConstant $$int %two 2;
OpIMul $$int result $n %two;
- // CHECK: instructions-at-end.slang([[#@LINE-1]]): error 29101: the result-id marker must only be used in the last instruction of a spriv_asm expression
+ // CHECK: instructions-at-end.slang([[#@LINE-1]]): error {{.*}}: the result-id marker must only be used in the last instruction of a spriv_asm expression
// CHECK: note 29102: consider adding an OpCopyObject instruction to the end of the spirv_asm expression
OpIAdd $$uint %something %two %two;
diff --git a/tests/language-feature/spirv-asm/too-many-operands.slang b/tests/language-feature/spirv-asm/too-many-operands.slang
index 219448699..38cd456ad 100644
--- a/tests/language-feature/spirv-asm/too-many-operands.slang
+++ b/tests/language-feature/spirv-asm/too-many-operands.slang
@@ -16,11 +16,11 @@ void foo(const int constParam)
%c
%d
%e
- // CHECK: too-many-operands.slang([[#@LINE-1]]): warning 29104: too many operands for OpLoad (expected max 4), did you forget a semicolon?
+ // CHECK: too-many-operands.slang([[#@LINE-1]]): warning {{.*}}: too many operands for OpLoad (expected max 4), did you forget a semicolon?
%f;
%r : $$int = OpIAdd %r %r // oops, I forgot the semicolon
OpNop
- // CHECK: too-many-operands.slang([[#@LINE-1]]): warning 29104: too many operands for OpIAdd (expected max 4), did you forget a semicolon?
+ // CHECK: too-many-operands.slang([[#@LINE-1]]): warning {{.*}}: too many operands for OpIAdd (expected max 4), did you forget a semicolon?
};
}
diff --git a/tests/language-feature/spirv-asm/wrong-assignment-opcode.slang b/tests/language-feature/spirv-asm/wrong-assignment-opcode.slang
index 4afbb0417..e93619254 100644
--- a/tests/language-feature/spirv-asm/wrong-assignment-opcode.slang
+++ b/tests/language-feature/spirv-asm/wrong-assignment-opcode.slang
@@ -15,7 +15,7 @@ int foo(const int constParam)
spirv_asm
{
%bar : %wrong = OpTypeInt 32 0
- // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error 29104: cannot use this 'x : <type> = OpTypeInt...' syntax because OpTypeInt does not have a <result-type-id> operand
+ // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error {{.*}}: cannot use this 'x : <type> = OpTypeInt...' syntax because OpTypeInt does not have a <result-type-id> operand
};
@@ -23,19 +23,19 @@ int foo(const int constParam)
spirv_asm
{
%foo = OpStore 1 2;
- // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error 29104: cannot use this 'x = OpStore...' syntax because OpStore does not have a <result-id> operand
+ // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error {{.*}}: cannot use this 'x = OpStore...' syntax because OpStore does not have a <result-id> operand
};
// garbage
spirv_asm
{
%foo =;
- // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error 20003: unexpected ';'
+ // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error {{.*}}: unexpected ';'
%foo :;
- // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error 20003: unexpected ';'
+ // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error {{.*}}: unexpected ';'
%foo : bar;
- // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error 20001: unexpected ';', expected '='
+ // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error {{.*}}: unexpected ';', expected '='
%foo : bar =;
- // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error 20003: unexpected ';'
+ // CHECK: wrong-assignment-opcode.slang([[#@LINE-1]]): error {{.*}}: unexpected ';'
};
}