[PATCH] D100875: [SimplifyLibCalls] Don't change alignment when creating memset

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 08:23:45 PDT 2021


xbolva00 added a comment.

Looks ok as a fix. I am just wondering if some other places should be checked as well.



================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:604
   // strncpy(x, s, c) -> memcpy(align 1 x, align 1 s, c) [s and c are constant]
   CallInst *NewCI = B.CreateMemCpy(Dst, Align(1), Src, Align(1),
                                    ConstantInt::get(DL.getIntPtrType(PT), Len));
----------------
Could we expect same problem here in the future?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100875/new/

https://reviews.llvm.org/D100875



More information about the llvm-commits mailing list