diff options
| author | Yong He <yonghe@outlook.com> | 2023-09-07 17:05:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-07 17:05:18 -0700 |
| commit | a7fa215e81e510de34ac96778ac6320cbb642d64 (patch) | |
| tree | 5d6c71b3d1e19e5bb145f44891f5074491ccc3c5 | |
| parent | 5d078d962e124e24ac7877cb29131dab794d7df9 (diff) | |
Lower LValue implicit cast before autodiff. (#3194)
Co-authored-by: Yong He <yhe@nvidia.com>
| -rw-r--r-- | source/slang/slang-emit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 68fd81cee..4bee37746 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -356,6 +356,9 @@ Result linkAndOptimizeIR( #endif validateIRModuleIfEnabled(codeGenContext, irModule); + // Lower all the LValue implict casts (used for out/inout/ref scenarios) + lowerLValueCast(targetRequest, irModule); + simplifyIR(irModule, sink); // Fill in default matrix layout into matrix types that left layout unspecified. @@ -897,9 +900,6 @@ Result linkAndOptimizeIR( lowerSizeOfLike(targetRequest, irModule, sink); - // Lower all the LValue implict casts (used for out/inout/ref scenarios) - lowerLValueCast(targetRequest, irModule); - // Lower all bit_cast operations on complex types into leaf-level // bit_cast on basic types. lowerBitCast(targetRequest, irModule); |
