https://bugs.llvm.org/show_bug.cgi?id=35128
Bug ID: 35128
Summary: inaccessiblememonly and inaccessiblemem_or_argmemonly
overwrite does not work on call with operand bundle
Product: libraries
Version: 5.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedb...@nondot.org
Reporter: yyc1...@gmail.com
CC: llvm-bugs@lists.llvm.org
According to LangRef,
> Calls and invokes with operand bundles have unknown read / write effect on
> the heap on entry and exit (even if the call target is readnone or readonly),
> unless they’re overridden with callsite specific attributes.
However, the callsite specific override seems to only work for `readonly`,
`readnone`, `argmemonly` but not for `inaccessiblememonly` and
`inaccessiblemem_or_argmemonly` as shown by the test case below,
```
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%jl_value_t = type opaque
define i64 @f(i64* %p, i64 %v) {
store i64 %v, i64* %p
call void @g() #0 [ "unknown"(i64* %p) ]
%v2 = load i64, i64* %p
ret i64 %v2
}
declare void @g() #0
; attributes #0 = { inaccessiblememonly }
attributes #0 = { inaccessiblemem_or_argmemonly }
```
`opt -O3` does not remove the load instruction with either attributes but any
of the following does,
* Change the attribute to any one of `readonly`, `readnone`, `argmemonly`
* Remove the operand bundle.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs