[llvm] [CodeGen] Generate mem intrinsic address calculations with nuw (PR #80184)

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 11:40:02 PST 2024


dschuff wrote:

This change as written should be straightforward,
but as pointed out in the bug there is actually also a case to be made for using 'nuw' unconditionally  (i.e. assuming that
the pointers are always dereferenceable up to the size of the memcpy). The langref doesn't explicitly say that it's UB if the pointers are not dereferenceable, but that's my interpretation of the langref and C standard.

https://github.com/llvm/llvm-project/pull/80184


More information about the llvm-commits mailing list