Issue 235725
Summary llubi accepts conflicting alias scope and noalias accesses
Labels new issue
Assignees
Reporter Roticv912
    A store carrying !alias.scope and a load carrying the matching !noalias scope access the same location without reporting undefined behavior.

### Program
```llvm
@g = global i32 0
!0 = distinct !{!0, i1 false, !"domain"}
!1 = distinct !{!1, !0, !"scope"}
!2 = !{!1}

define i32 @main() {
entry:
  store i32 1, ptr @g, !alias.scope !2
  %x = load i32, ptr @g, !noalias !2
  ret i32 0
}
```

### Output
```
Entering function: main
  store i32 1, ptr @g, align 4, !alias.scope !4
  %x = load i32, ptr @g, align 4, !noalias !4 => i32 1
  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