Skip to content

Commit

Permalink
Add extra fast-math decoration in OpPhi tests
Browse files Browse the repository at this point in the history
In the code
    %comp               = OpFOrdGreaterThan %type_bool %arg1 %arg2
the test was applying the correct fast-math decorations to %comp but not
to %arg1 or %arg2. This meant that the compiler was still able to infer
that the inputs to the comparison could not be certain values and
optimise the results accordingly, causing the test to fail. Add the
decorations to %arg1 and %arg2 as well.

Components: Vulkan
Affects: dEQP-VK.spirv_assembly.instruction.*.float_controls2.*.phi_*

Change-Id: I814f379599be167a32ee081f65b7d824ed5929de
(cherry picked from commit 1e26940)
  • Loading branch information
gnl21 authored and lordalcol committed Sep 1, 2024
1 parent 29f46f7 commit 24c1b14
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ void TestCasesBuilder::init()
" OpBranch %comp_merge\n"
"%comp_merge = OpLabel\n"
"%result = OpPhi %type_float %arg2 %true_branch %arg1 %false_branch\n",
B_STATEMENT_USAGE_COMMANDS_TYPE_FLOAT, {"comp", "result"});
B_STATEMENT_USAGE_COMMANDS_TYPE_FLOAT, {"arg1", "arg2", "comp", "result"});
mo[OID_SELECT] = Op("select", FLOAT_ARITHMETIC,
"%always_true = OpFOrdGreaterThan %type_bool %c_float_1 %c_float_0\n"
"%result = OpSelect %type_float %always_true %arg1 %arg2\n",
Expand Down

0 comments on commit 24c1b14

Please sign in to comment.