[all-commits] [llvm/llvm-project] 150595: LoopIdiom: avoid patterned memset if constant is n...

Tim Northover via All-commits all-commits at lists.llvm.org
Thu Jan 12 10:53:20 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 150595ab4be34e392e345d347dcb767df04a5383
      https://github.com/llvm/llvm-project/commit/150595ab4be34e392e345d347dcb767df04a5383
  Author: Tim Northover <tnorthover at apple.com>
  Date:   2023-01-12 (Thu, 12 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
    M llvm/test/Transforms/LoopIdiom/basic.ll

  Log Message:
  -----------
  LoopIdiom: avoid patterned memset if constant is not relocatable.

The pattern we're using for the memset_pattern* call gets put into a static
global variable initialized, which means it has to be representable with
relocations on the target. Most `ConstantExpr` instances do not satisfy this
constraint, so avoid all of them for now.




More information about the All-commits mailing list