diff options
| author | winmad <winmad.wlf@gmail.com> | 2023-04-14 11:36:19 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-14 11:36:19 -0700 |
| commit | 2226ae0bbbf2cbd5ea2da8aaaa04c9c466af56c3 (patch) | |
| tree | 7041f86d73eee2357306c2b12c8ef6d7c0996b84 /source | |
| parent | 168c58389e9155312a8cef88d986a4ceee5a511e (diff) | |
Bugfix: compiler will run forever to eliminate dead code (#2809)
* Add a test case that the compile will run forever
* Fix.
* fix.
---------
Co-authored-by: Lifan Wu <lifanw@nvidia.com>
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 92da981ad..dd3034da1 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -6889,6 +6889,8 @@ namespace Slang SLANG_ASSERT(other); if (other->getPrevInst() == this) return; + if (other == this) + return; _insertAt(other->getPrevInst(), other, other->getParent()); } |
