diff options
| author | venkataram-nv <vedavamadath@nvidia.com> | 2025-07-31 15:12:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-31 22:12:21 +0000 |
| commit | 30fd3c63fb4af9ea8d482c75921710df1b40e59e (patch) | |
| tree | cd1001e90f5328f20fa7bc6d030bcfcc4e01979f /source/slang/slang-ir.cpp | |
| parent | aefd1e3e0dbe4e77f8d7dbbfa04e15c2db615394 (diff) | |
Add matrix select intrinsic (#7566)
* Add matrix select intrinsic
* Fix hlsl test
* Restrict matrix select to HLSL
* Better test for HLSL side
* Select route for GLSL/SPIRV
* Exclude matrices from select legalization
* Exclude CUDA from select test
* Inline and move
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 63d3766ab..b48dcc7e6 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -5995,14 +5995,14 @@ IRInst* IRBuilder::emitIfElseWithBlocks( outTrueBlock = createBlock(); outAfterBlock = createBlock(); outFalseBlock = createBlock(); + auto f = getFunc(); - SLANG_ASSERT(f); - if (f) - { - f->addBlock(outTrueBlock); - f->addBlock(outAfterBlock); - f->addBlock(outFalseBlock); - } + + SLANG_ASSERT(f && "Expected function"); + f->addBlock(outTrueBlock); + f->addBlock(outAfterBlock); + f->addBlock(outFalseBlock); + auto result = emitIfElse(val, outTrueBlock, outFalseBlock, outAfterBlock); setInsertInto(outTrueBlock); return result; |
