Defined behavior on all wave sensitivity outcomes (#3405)

The wave sensitivity analysis should produce a result for any relevant
instruction. It fails in some cases, which is a bug. However, the result
of that bug shouldn't be intermittent incorrect errors as it is now.

When a result isn't found, assume that there is no wave sensitivity. The
assert is kept and might produce a warning ultimately. This is meant to
add a guard rail to the worst case scenario.
This commit is contained in:
Greg Roth 2021-01-28 18:34:17 -07:00 коммит произвёл GitHub
Родитель 0df938a563
Коммит 9248e571fe
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -210,7 +210,10 @@ void WaveSensitivityAnalyzer::VisitInst(Instruction *I) {
bool WaveSensitivityAnalyzer::IsWaveSensitive(Instruction *op) {
auto c = InstState.find(op);
DXASSERT(c != InstState.end(), "else analysis didn't complete");
if(c == InstState.end()) {
DXASSERT(false, "Instruction sensitivity not foud. Analysis didn't complete!");
return false;
}
DXASSERT((*c).second != Unknown, "else analysis is missing a case");
return (*c).second == KnownSensitive;
}