[PATCH] D121971: [AutoUpgrade] Don't lose attributes when upgrading mem intrinsics
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 11 05:18:09 PDT 2022
arichardson added inline comments.
================
Comment at: llvm/lib/IR/AutoUpgrade.cpp:4080
NewCall = Builder.CreateCall(NewFn, Args);
+ NewCall->setAttributes(CI->getAttributes());
auto *MemCI = cast<MemIntrinsic>(NewCall);
----------------
arichardson wrote:
> nikic wrote:
> > Don't you need to remove the attributes the the 4th argument (that is being dropped) from the attribute list?
> Oh yes that's a good point. I guess it hasn't mattered so far since I've not seen an attribute on that argument, let me see what happens if there is one.
Not sure if there is an better way of generating the new AttributeList, creating a new one seemed like the easiest way.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121971/new/
https://reviews.llvm.org/D121971
More information about the llvm-commits
mailing list