Page MenuHomePhabricator

Change memcpy/memove/memset to have dest and source alignment attributes.

Authored by dneilson on Jan 2 2018, 12:04 PM.


Upstream LLVM is changing the the prototypes of the @llvm.memcpy/memmove/memset intrinsics. This change updates the polly ScopHelper and the polly tests for this change.

The @llvm.memcpy/memmove/memset intrinsics currently have an explicit argument which is required to be a constant integer. It represents the alignment of the dest (and source), and so must be the minimum of the actual alignment of the two.

This change allows source and dest to each have their own alignments by using the alignment attribute on their arguments. The alignment argument is removed.

For example, code which used to read:

call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 100, i32 4, i1 false)

will now read

call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %dest, i8* align 4 %src, i32 100, i1 false)

Diff Detail