summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-util.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-05-02 20:29:38 -0700
committerGitHub <noreply@github.com>2023-05-02 20:29:38 -0700
commitd52376a65f37fcbbb67428b917fd3819436b6dfb (patch)
treeda25b3c9a00bd003b1970b4a6c4eb38eccf62aa1 /source/slang/slang-ir-util.cpp
parent55291b0bf6d729fcbaf75a01926da7da8975b8e9 (diff)
Various dxc/fxc compatibility fixes. (#2863)
* Various dxc/fxc compatibility fixes. * Cleanup. * Fix test cases. * Fix comments. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-util.cpp')
-rw-r--r--source/slang/slang-ir-util.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp
index 95240a26c..506e96c81 100644
--- a/source/slang/slang-ir-util.cpp
+++ b/source/slang/slang-ir-util.cpp
@@ -430,6 +430,11 @@ bool canInstHaveSideEffectAtAddress(IRGlobalValueWithCode* func, IRInst* inst, I
if (canAddressesPotentiallyAlias(func, as<IRStore>(inst)->getPtr(), addr))
return true;
break;
+ case kIROp_SwizzledStore:
+ // If the target of the swizzled store inst may overlap addr, return true.
+ if (canAddressesPotentiallyAlias(func, as<IRSwizzledStore>(inst)->getDest(), addr))
+ return true;
+ break;
case kIROp_Call:
{
auto call = as<IRCall>(inst);