Issue 235432
Summary llubi accepts a bounded recursive call to a norecurse function
Labels new issue
Assignees
Reporter Roticv912
    A norecurse function calls itself once and both invocations return without reporting undefined behavior.

### Program
```llvm
define void @f(i1 %recurse) norecurse {
  br i1 %recurse, label %a, label %b
a:
  call void @f(i1 false)
  ret void
b:
  ret void
}

define i32 @main() {
entry:
  call void @f(i1 true)
  ret i32 0
}
```

### Output
```
Entering function: main
Entering function: f
 i1 %recurse = T
  br i1 %recurse, label %a, label %b jump to %a
Entering function: f
  i1 %recurse = F
  br i1 %recurse, label %a, label %b jump to %b
  ret void
Exiting function: f
  call void @f(i1 false)
  ret void
Exiting function: f
  call void @f(i1 true)
  ret i32 0
Exiting function: main
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to