
This adds -no-opaque-pointers to clang tests whose output will change when opaque pointers are enabled by default. This is intended to be part of the migration approach described in https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9. The patch has been produced by replacing %clang_cc1 with %clang_cc1 -no-opaque-pointers for tests that fail with opaque pointers enabled. Worth noting that this doesn't cover all tests, there's a remaining ~40 tests not using %clang_cc1 that will need a followup change. Differential Revision: https://reviews.llvm.org/D123115
13 lines
653 B
C
13 lines
653 B
C
/// Check that the new alignment set by the alignment builtins is propagated
|
|
/// to e.g. llvm.memcpy calls.
|
|
// RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-unknown-unknown %s -emit-llvm -O1 -o - | FileCheck %s
|
|
|
|
// CHECK-LABEL: define {{[^@]+}}@align_up
|
|
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* noundef nonnull align 64 dereferenceable(16) {{%.+}}, i8* noundef nonnull align 1 dereferenceable(16) {{%.+}}, i64 16, i1 false)
|
|
// CHECK-NEXT: ret void
|
|
//
|
|
void align_up(void* data, int* ptr) {
|
|
// The call to llvm.memcpy should have an "align 64" on the first argument
|
|
__builtin_memcpy(__builtin_align_up(ptr, 64), data, 16);
|
|
}
|