[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 03:51:22 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);
----------------
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.


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