[AutoUpgrade] Don't lose attributes when upgrading mem intrinsics
authorAlex Richardson <alexrichardson@google.com>
Thu, 17 Mar 2022 23:28:11 +0000 (23:28 +0000)
committerAlex Richardson <alexrichardson@google.com>
Wed, 13 Apr 2022 09:30:10 +0000 (09:30 +0000)
commit9107cd632d5088076411ae5253f73dcd9cd650e9
treeebb78fe84dcea39682fd4e359e9f9404fd1c175d
parent44271e7c5582a01ec389231ee98687b0b4557df4
[AutoUpgrade] Don't lose attributes when upgrading mem intrinsics

The original AutoUpgrade code from 1e68724d24ba38de7c7cdb2e1939d78c8b37cc0d
did not retain existing attributes. I noticed this in some downstream test
cases, but it turns out there are also two affected testcase upstream.

Differential Revision: https://reviews.llvm.org/D121971
llvm/lib/IR/AutoUpgrade.cpp
llvm/test/Bitcode/upgrade-memory-intrinsics.ll
llvm/test/Transforms/IROutliner/illegal-memset.ll
llvm/test/Transforms/IROutliner/outline-memset.ll