summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-peephole.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-11-10 13:55:14 -0800
committerGitHub <noreply@github.com>2023-11-10 13:55:14 -0800
commit011d4281647e3a2a3cf0dbdda1fa65cc1b8ed881 (patch)
tree70f91655e86d30529eda0a683e15f378eeae2cb5 /source/slang/slang-ir-peephole.cpp
parentbfd3f39d04047d7a46e75206cd125ed87b3f3f99 (diff)
Cleanup builtin arithmetic interfaces. (#3317)
* wip: clean up IArithmetic * wip. * Cleanup builtin arithmetic interfaces. * Fix. * Fixes. * Fix. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-peephole.cpp')
-rw-r--r--source/slang/slang-ir-peephole.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/slang-ir-peephole.cpp b/source/slang/slang-ir-peephole.cpp
index b6b7823c9..d7713618e 100644
--- a/source/slang/slang-ir-peephole.cpp
+++ b/source/slang/slang-ir-peephole.cpp
@@ -317,7 +317,7 @@ struct PeepholeContext : InstPassBase
}
else
{
- changed = tryFoldElementExtractFromUpdateInst(inst);
+ changed |= tryFoldElementExtractFromUpdateInst(inst);
}
break;
case kIROp_GetElement:
@@ -382,7 +382,7 @@ struct PeepholeContext : InstPassBase
}
else
{
- changed = tryFoldElementExtractFromUpdateInst(inst);
+ changed |= tryFoldElementExtractFromUpdateInst(inst);
}
break;
case kIROp_UpdateElement:
@@ -806,7 +806,7 @@ struct PeepholeContext : InstPassBase
case kIROp_Div:
case kIROp_And:
case kIROp_Or:
- changed = tryOptimizeArithmeticInst(inst);
+ changed |= tryOptimizeArithmeticInst(inst);
break;
case kIROp_Param:
{