mirror of
https://gitee.com/openharmony/third_party_spirv-tools
synced 2024-11-24 07:49:46 +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(
|
||||
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).
|
||||
if (!constant->AsIntConstant() &&
|
||||
!(constant->AsVectorConstant() &&
|
||||
|
Loading…
Reference in New Issue
Block a user