[all-commits] [llvm/llvm-project] 656ebd: [SimplifyLibCalls] Don't change alignment when cre...

Stefan Stipanovic via All-commits all-commits at lists.llvm.org
Wed Apr 21 11:42:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 656ebd519e3fd52050e1c8abeacafcf94d1fa260
      https://github.com/llvm/llvm-project/commit/656ebd519e3fd52050e1c8abeacafcf94d1fa260
  Author: sstefan1 <sstipanovic at s-energize.com>
  Date:   2021-04-21 (Wed, 21 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    M llvm/test/Transforms/InstCombine/strncpy-1.ll

  Log Message:
  -----------
  [SimplifyLibCalls] Don't change alignment when creating memset

Fix for PR49984
This was discovered during Attributor testing.
Memset was always created with alignment of 1
and in case when strncpy alignment was changed
it triggered an assertion in the AttrBuilder.
Memset will now be created with appropriate alignment.

Differential Revision: https://reviews.llvm.org/D100875




More information about the All-commits mailing list