diff options
| author | ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> | 2024-07-16 18:21:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-16 15:21:51 -0700 |
| commit | f545ef30052de7b4cab389cb58ffb0ea67ffb32c (patch) | |
| tree | c35233712fff502466cab0ecbee33ef81f400cd2 /source | |
| parent | 05547e25353dd797791c2937679468d529d832d5 (diff) | |
Fix minimal-optimization flag with texture atomics (#4660)
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-legalize-is-texture-access.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source/slang/slang-ir-legalize-is-texture-access.cpp b/source/slang/slang-ir-legalize-is-texture-access.cpp index a3540e3f2..b9a0a7772 100644 --- a/source/slang/slang-ir-legalize-is-texture-access.cpp +++ b/source/slang/slang-ir-legalize-is-texture-access.cpp @@ -39,11 +39,9 @@ namespace Slang if (getTextureAccess(inst)) inst->replaceUsesWith(builder.getBoolValue(true)); else - { inst->replaceUsesWith(builder.getBoolValue(false)); - functionsToSCCP.add(func); - } inst->removeAndDeallocate(); + functionsToSCCP.add(func); continue; case kIROp_IsTextureArrayAccess: { @@ -51,11 +49,9 @@ namespace Slang if (textureAccess && as<IRTextureType>(textureAccess->getImage()->getDataType())->isArray()) inst->replaceUsesWith(builder.getBoolValue(true)); else - { inst->replaceUsesWith(builder.getBoolValue(false)); - functionsToSCCP.add(func); - } inst->removeAndDeallocate(); + functionsToSCCP.add(func); continue; } case kIROp_IsTextureScalarAccess: @@ -64,11 +60,9 @@ namespace Slang if (textureAccess && !as<IRVectorType>(as<IRTextureType>(textureAccess->getImage()->getDataType())->getElementType())) inst->replaceUsesWith(builder.getBoolValue(true)); else - { inst->replaceUsesWith(builder.getBoolValue(false)); - functionsToSCCP.add(func); - } inst->removeAndDeallocate(); + functionsToSCCP.add(func); continue; } } @@ -79,7 +73,7 @@ namespace Slang // and unresolved 'isTextureAccess' operations for when 'inst' is not a // 'IRTextureType'/`TextureAccessor` for (auto func : functionsToSCCP) - applySparseConditionalConstantPropagation(func, sink); + applySparseConditionalConstantPropagation(func, sink); } } |
