[all-commits] [llvm/llvm-project] 4316b0: [LoopStrengthReduce] Ensure that debug intrinsics ...
Stephen Tozer via All-commits
all-commits at lists.llvm.org
Wed Jun 2 07:57:29 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4316b0e59cfa4b65ce59f055ba271519679f9750
https://github.com/llvm/llvm-project/commit/4316b0e59cfa4b65ce59f055ba271519679f9750
Author: Stephen Tozer <Stephen.Tozer at Sony.com>
Date: 2021-06-02 (Wed, 02 Jun 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
A llvm/test/Transforms/LoopStrengthReduce/X86/lsr-cond-dbg.ll
Log Message:
-----------
[LoopStrengthReduce] Ensure that debug intrinsics do not affect LSR's output
During Loop Strength Reduce, if the terminating condition for the loop
is not immediately adjacent to the terminating branch and it has more
than one use, a clone of the condition will be created just before the
terminating branch and will be used as the branch condition. Currently,
whether the instructions are "immediately adjacent" is determined by
checking whether the next instruction after the condition is the
terminating branch; this is incorrect however, as the presence of a
debug intrinsic between the two will result in a change to the output.
This is fixed by using getNextNonDebugInstruction() instead.
Differential Revision: https://reviews.llvm.org/D103033
More information about the All-commits
mailing list