[all-commits] [llvm/llvm-project] 98db33: [SLC] Fix pointer diff type in sprintf() optimization

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jan 25 06:23:12 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98db33349bcc4d12a56313c406c1f40038258f10
      https://github.com/llvm/llvm-project/commit/98db33349bcc4d12a56313c406c1f40038258f10
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-01-25 (Tue, 25 Jan 2022)

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

  Log Message:
  -----------
  [SLC] Fix pointer diff type in sprintf() optimization

We should always be calculating a byte-wise difference here.
Previously this calculated the pointer difference while taking
the pointer element type into account, which is incorrect.




More information about the All-commits mailing list