[llvm] [ConstraintElim] Support arbitrary incoming values for inductions (PR #68032)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 13:26:42 PST 2023


antoniofrighetto wrote:

Reduced to:
```llvm
define void @test() {
entry:
  br label %while.cond1

while.cond1:                                      ; preds = %while.cond1, %entry
  %__first.addr.1 = phi ptr [ null, %entry ], [ %incdec.ptr, %while.cond1 ]
  %incdec.ptr = getelementptr ptr, ptr %__first.addr.1, i32 1
  br i1 false, label %while.cond1, label %do.body

do.body:                                          ; preds = %do.cond, %while.cond1
  %__first.addr.1.lcssa = phi ptr [ %__first.addr.1, %do.cond ], [ %__first.addr.1, %while.cond1 ]
  %cmp7 = icmp eq ptr %__first.addr.1.lcssa, null
  br i1 %cmp7, label %if.then8, label %do.cond

if.then8:                                         ; preds = %do.body
  ret void

do.cond:                                          ; preds = %do.body
  br label %do.body
}
```

https://github.com/llvm/llvm-project/pull/68032


More information about the llvm-commits mailing list