From d93c55a7b944e9ee40c72a98ff05781b56979c6c Mon Sep 17 00:00:00 2001 From: lkcl Date: Mon, 16 Aug 2021 16:30:27 +0100 Subject: [PATCH] --- openpower/sv/branches.mdwn | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/openpower/sv/branches.mdwn b/openpower/sv/branches.mdwn index a145e3612..7d3aec698 100644 --- a/openpower/sv/branches.mdwn +++ b/openpower/sv/branches.mdwn @@ -22,10 +22,19 @@ cannot branch to multiple destinations based on multiple conditions. The best that can be done is to test multiple Conditions and make a decision of a *single* branch, based on analysis of a *Vector* of CR Fields -which have just been calculated from a *Vector* of results. In 3D Shader +which have just been calculated from a *Vector* of results. + +In 3D Shader binaries, which are inherently parallelised and predicated, testing all or some results and branching based on multiple tests is extremely common, -and a fundamental part of Shader Compilers. Therefore, `sv.bc` and +and a fundamental part of Shader Compilers. Example: +without such multi-condition +test-and-branch, if a predicate mask is all zeros a large batch of +instructions may be masked out to `nop`, and it would waste +CPU cycles not only to run them but also to load the predicate +mask repeatedly for each one. 3D GPU ISAs can test for this scenario +and jump over the masked-out operations. +Therefore, in order to be commercially competitive, `sv.bc` and other Vector-aware Branch Conditional instructions are a high priority for 3D GPU workloads. -- 2.30.2