summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-loop-unroll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-loop-unroll.cpp')
-rw-r--r--source/slang/slang-ir-loop-unroll.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/slang/slang-ir-loop-unroll.cpp b/source/slang/slang-ir-loop-unroll.cpp
index b5af2d974..6970942c9 100644
--- a/source/slang/slang-ir-loop-unroll.cpp
+++ b/source/slang/slang-ir-loop-unroll.cpp
@@ -472,15 +472,9 @@ bool unrollLoopsInModule(IRModule* module, DiagnosticSink* sink)
for (auto inst : module->getGlobalInsts())
{
if (auto genFunc = as<IRGeneric>(inst))
- {
- if (auto func = as<IRGlobalValueWithCode>(findGenericReturnVal(genFunc)))
- {
- bool result = unrollLoopsInFunc(module, func, sink);
- if (!result)
- return false;
- }
- }
- else if (auto func = as<IRGlobalValueWithCode>(inst))
+ continue;
+
+ if (auto func = as<IRGlobalValueWithCode>(inst))
{
bool result = unrollLoopsInFunc(module, func, sink);
if (!result)