dtcxzyw wrote:

> > The ubsan handler cannot be eliminated because inaccessiblemem: readwrite 
> > indicates that it has externally observable side effects.
> 
> That is not how things work. For example:
> 
> ```
> $ echo "declare void @g() define void @f() nounwind { call void @g() 
> memory(argmem: read, inaccessiblemem: readwrite) willreturn unreachable }" | 
> opt -O3 -S
> ; ModuleID = '<stdin>'
> source_filename = "<stdin>"
> 
> ; Function Attrs: mustprogress nofree norecurse noreturn nosync nounwind 
> willreturn memory(none)
> define void @f() local_unnamed_addr #0 {
>   unreachable
> }
> 
> attributes #0 = { mustprogress nofree norecurse noreturn nosync nounwind 
> willreturn memory(none) }
> ```

Fixed. Now it sets `mustprogress`.


https://github.com/llvm/llvm-project/pull/130990
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to