Index: lib/CodeGen/CGCXX.cpp =================================================================== --- lib/CodeGen/CGCXX.cpp +++ lib/CodeGen/CGCXX.cpp @@ -224,6 +224,11 @@ } else { const auto *CD = cast(MD); GD = GlobalDecl(CD, toCXXCtorType(Type)); + + // As long as `this` argument always comes first + // we hardcode the position of the `src` argument + if (CD->isCopyOrMoveConstructor()) + Fn->addParamAttr(1, llvm::Attribute::NoAlias); } setFunctionLinkage(GD, Fn);