[all-commits] [llvm/llvm-project] 58b966: [LSR] Fix bug - check if loop has preheader before...
syzaara via All-commits
all-commits at lists.llvm.org
Thu Jul 7 12:13:59 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 58b9666dc1a09819377ae585b4718ef2ea951970
https://github.com/llvm/llvm-project/commit/58b9666dc1a09819377ae585b4718ef2ea951970
Author: Zaara Syeda <syzaara at ca.ibm.com>
Date: 2022-07-07 (Thu, 07 Jul 2022)
Changed paths:
M llvm/lib/Transforms/Utils/LoopUtils.cpp
M llvm/test/Transforms/LoopStrengthReduce/remove_scev_indvars.ll
Log Message:
-----------
[LSR] Fix bug - check if loop has preheader before calling isInductionPHI
Fix bug exposed by https://reviews.llvm.org/D125990
rewriteLoopExitValues calls InductionDescriptor::isInductionPHI which requires
the PHI node to have an incoming edge from the loop preheader. This adds checks
before calling InductionDescriptor::isInductionPHI to see that the loop has a
preheader. Also did some refactoring.
Differential Revision: https://reviews.llvm.org/D129297
More information about the All-commits
mailing list