[llvm] [ConstraintElim] Support decrementing inductions with step -1. (PR #68644)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 10 01:05:29 PDT 2023
================
@@ -889,6 +889,26 @@ void State::addInfoForInductions(BasicBlock &BB) {
else
return;
+ // Handle negative steps.
+ if (StepOffset.isNegative()) {
+ // TODO: Extend to allow steps > -1.
+ if (!(-StepOffset).isOne())
+ return;
+
+ // AR may wrap.h
----------------
nikic wrote:
.h
https://github.com/llvm/llvm-project/pull/68644
More information about the llvm-commits
mailing list