Issue 235735
Summary llubi accepts equality comparisons between block addresses
Labels new issue
Assignees
Reporter Roticv912
    An equality comparison between two blockaddress values produces a normal boolean and execution finishes without reporting undefined behavior.

### Program
```llvm
define i32 @main() {
entry:
 %c = icmp eq ptr blockaddress(@main, %a), blockaddress(@main, %b)
  br i1 %c, label %a, label %b
a:
  ret i32 0
b:
  ret i32 0
}
```

### Output
```
Entering function: main
  %c = icmp eq ptr blockaddress(@main, %a), blockaddress(@main, %b) => F
  br i1 %c, label %a, label %b jump to %b
  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