diff --git a/func.cpp b/func.cpp index 51267656..aec9afa7 100644 --- a/func.cpp +++ b/func.cpp @@ -503,6 +503,11 @@ Function::GenerateIR() { appFunction->setDoesNotThrow(); #endif + for (int i = 0; i < type->GetNumParameters(); i++) { + if (function->doesNotAlias(i)) { + appFunction->setDoesNotAlias(i); + } + } g->target->markFuncWithTargetAttr(appFunction); if (appFunction->getName() != functionName) {