mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-10-18 19:20:05 +00:00
spirv-fuzz: Avoid irrelevant constants in synonym-creating loops (#3967)
Fixes #3956.
This commit is contained in:
parent
26954c281e
commit
dc9c6407d6
@ -50,6 +50,12 @@ void FuzzerPassAddLoopsToCreateIntConstantSynonyms::Apply() {
|
|||||||
auto constant = GetIRContext()->get_constant_mgr()->FindDeclaredConstant(
|
auto constant = GetIRContext()->get_constant_mgr()->FindDeclaredConstant(
|
||||||
constant_def->result_id());
|
constant_def->result_id());
|
||||||
|
|
||||||
|
// We do not consider irrelevant constants
|
||||||
|
if (GetTransformationContext()->GetFactManager()->IdIsIrrelevant(
|
||||||
|
constant_def->result_id())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// We only consider integer constants (scalar or vector).
|
// We only consider integer constants (scalar or vector).
|
||||||
if (!constant->AsIntConstant() &&
|
if (!constant->AsIntConstant() &&
|
||||||
!(constant->AsVectorConstant() &&
|
!(constant->AsVectorConstant() &&
|
||||||
|
Loading…
Reference in New Issue
Block a user