[PATCH] D101142: [SimplifyCFG/JumpThreading] Transfer loop metadata to new latch.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 00:15:01 PDT 2021


Meinersbur created this revision.
Meinersbur added reviewers: jeroen.dobbelaere, jdoerfert.
Meinersbur added a project: LLVM.
Herald added a subscriber: hiraditya.
Meinersbur requested review of this revision.

When simplifying an empty block with an unconditional branch by skipping over it, the skipped block might have been a loop's latch. In that case transfer the loop's metadata attached to the latch to the new latch. If it already is also a latch with different metadata, do not skip the block.

Part of fix for llvm.org/PR50060.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101142

Files:
  llvm/include/llvm/Transforms/Scalar/JumpThreading.h
  llvm/include/llvm/Transforms/Utils/Local.h
  llvm/lib/Transforms/Scalar/JumpThreading.cpp
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
  llvm/test/Transforms/SimplifyCFG/pr50060-jumpthread.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101142.339905.patch
Type: text/x-patch
Size: 13064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210423/dad4673e/attachment.bin>


More information about the llvm-commits mailing list