mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-25 17:21:06 +00:00
Don't "break" from selection constructs. (#1862)
If seems like at least 1 driver does not like a condition jump to the end of a selection construct. We are generating these in the merge return pass. This change stops merge return from generating this sequence. Part of #1861.
This commit is contained in:
parent
6c73b1fb70
commit
b4d3618f77
@ -315,7 +315,11 @@ void MergeReturnPass::PredicateBlocks(
|
||||
state++;
|
||||
}
|
||||
BreakFromConstruct(block, next, predicated, order);
|
||||
} else if (state->InStructuredFlow()) {
|
||||
} else if (false && state->InStructuredFlow()) {
|
||||
// TODO(#1861): This is disabled until drivers are fixed to accept
|
||||
// conditional exits from a selection construct. Reenable tests when
|
||||
// this code is turned back on.
|
||||
|
||||
next = context()->get_instr_block(state->CurrentMergeId());
|
||||
state++;
|
||||
BreakFromConstruct(block, next, predicated, order);
|
||||
|
@ -489,6 +489,9 @@ TEST_F(MergeReturnPassTest, SplitBlockUsedInPhi) {
|
||||
SinglePassRunAndMatch<MergeReturnPass>(before, false);
|
||||
}
|
||||
|
||||
// TODO(#1861): Reenable these test when the breaks from selection constructs
|
||||
// are reenabled.
|
||||
/*
|
||||
TEST_F(MergeReturnPassTest, UpdateOrderWhenPredicating) {
|
||||
const std::string before =
|
||||
R"(
|
||||
@ -553,6 +556,7 @@ TEST_F(MergeReturnPassTest, UpdateOrderWhenPredicating) {
|
||||
|
||||
SinglePassRunAndMatch<MergeReturnPass>(before, false);
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
TEST_F(MergeReturnPassTest, StructuredControlFlowBothMergeAndHeader) {
|
||||
@ -638,6 +642,9 @@ OpFunctionEnd
|
||||
SinglePassRunAndCheck<MergeReturnPass>(before, after, false, true);
|
||||
}
|
||||
|
||||
// TODO(#1861): Reenable these test when the breaks from selection constructs
|
||||
// are reenabled.
|
||||
/*
|
||||
TEST_F(MergeReturnPassTest, NestedSelectionMerge) {
|
||||
const std::string before =
|
||||
R"(
|
||||
@ -917,6 +924,7 @@ OpFunctionEnd
|
||||
|
||||
SinglePassRunAndCheck<MergeReturnPass>(before, after, false, true);
|
||||
}
|
||||
*/
|
||||
|
||||
TEST_F(MergeReturnPassTest, NestedLoopMerge) {
|
||||
const std::string before =
|
||||
|
Loading…
Reference in New Issue
Block a user