search for: 8uxvbq

Displaying 2 results from an estimated 2 matches for "8uxvbq".

Did you mean: 8uvq
2017 Jul 21
2
Which assumptions do llvm.memcpy/memmove/memset.* make when the count is 0?
> So, the pointer arguments of memcpy *shall* (a violation of a shall > clause is UB, per ยง4/2) have valid values, even though the function will > copy zero characters. This is true in C but the question was about LLVM intrinsics. Since the LangRef does not mention any such restriction, I would assume that memcpy(0,0,0) is not UB in LLVM. If it is UB then we must update the LangRef
2017 Jul 21
3
Which assumptions do llvm.memcpy/memmove/memset.* make when the count is 0?
...ld code that depends on this behavior." On Thu, Jul 20, 2017 at 9:06 PM, John Regehr via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Also note that whereas GCC exploits the tricky definition of memcpy(), LLVM > at present doesn't appear to: > > https://godbolt.org/g/8uxvBQ > > In fact LLVM doesn't even assume the pointer is non-null in a case where I'd > argue that it should: > > https://godbolt.org/g/svHQKL > > John > > > > On 07/20/2017 10:00 PM, John Regehr via llvm-dev wrote: >>> >>> So, the pointer arg...