[PATCH] D125114: [SimplifyLibCalls] handle subobjects of constant aggregates

Martin Sebor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 15:47:25 PDT 2022


msebor updated this revision to Diff 438050.
msebor marked an inline comment as done.
msebor added a comment.

Revision 4 of the patch includes the following changes:

- Keep `optimizeMemCmpVarSize` from folding calls with excessive constant sizes (exposed by rebasing on top of latest trunk).
- Remove code in `getConstantDataArrayInfo` made redundant by other changes in the same function.
- Remove tests from `memcmp-3.ll` that are duplicated in `memcmp-4.ll`.
- Let `clang-format` adjust formatting.

Retested by running `make check-all`.


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

https://reviews.llvm.org/D125114

Files:
  llvm/include/llvm/Analysis/ConstantFolding.h
  llvm/lib/Analysis/ConstantFolding.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
  llvm/test/CodeGen/AArch64/arm64-2012-05-07-MemcpyAlignBug.ll
  llvm/test/CodeGen/ARM/constantpool-promote-ldrh.ll
  llvm/test/CodeGen/BPF/remove_truncate_5.ll
  llvm/test/CodeGen/BPF/rodata_2.ll
  llvm/test/CodeGen/PowerPC/aix-vec-arg-spills-mir.ll
  llvm/test/CodeGen/PowerPC/aix-vec-arg-spills.ll
  llvm/test/DebugInfo/COFF/types-array.ll
  llvm/test/Transforms/InstCombine/memchr-5.ll
  llvm/test/Transforms/InstCombine/memchr-8.ll
  llvm/test/Transforms/InstCombine/memcmp-3.ll
  llvm/test/Transforms/InstCombine/memcmp-4.ll
  llvm/test/Transforms/InstCombine/memcmp-constant-fold.ll
  llvm/test/Transforms/InstCombine/memrchr-5.ll
  llvm/test/Transforms/InstCombine/sprintf-2.ll
  llvm/test/Transforms/InstCombine/str-int-3.ll
  llvm/test/Transforms/InstCombine/strcmp-3.ll
  llvm/test/Transforms/InstCombine/strlen-5.ll
  llvm/test/Transforms/InstCombine/strlen-6.ll
  llvm/test/Transforms/InstCombine/strlen-7.ll
  llvm/test/Transforms/InstCombine/strlen-8.ll
  llvm/test/Transforms/InstCombine/strncmp-4.ll
  llvm/test/Transforms/InstCombine/wcslen-3.ll
  llvm/test/Transforms/InstCombine/wcslen-6.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125114.438050.patch
Type: text/x-patch
Size: 151575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220617/81495b85/attachment-0001.bin>


More information about the llvm-commits mailing list