Mercurial > hg > CbC > CbC_llvm
comparison clang/test/CodeGen/builtin-align-assumption.c @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
1 /// Check that the new alignment set by the alignment builtins is propagated | 1 /// Check that the new alignment set by the alignment builtins is propagated |
2 /// to e.g. llvm.memcpy calls. | 2 /// to e.g. llvm.memcpy calls. |
3 // RUN: %clang_cc1 -triple=x86_64-unknown-unknown %s -emit-llvm -O1 -o - | FileCheck %s | 3 // RUN: %clang_cc1 -triple=x86_64-unknown-unknown %s -emit-llvm -O1 -o - | FileCheck %s |
4 | 4 |
5 // CHECK-LABEL: define {{[^@]+}}@align_up | 5 // CHECK-LABEL: define {{[^@]+}}@align_up |
6 // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 64 dereferenceable(16) {{%.+}}, i8* nonnull align 1 dereferenceable(16) {{%.+}}, i64 16, i1 false) | 6 // 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) |
7 // CHECK-NEXT: ret void | 7 // CHECK-NEXT: ret void |
8 // | 8 // |
9 void align_up(void* data, int* ptr) { | 9 void align_up(void* data, int* ptr) { |
10 // The call to llvm.memcpy should have an "align 64" on the first argument | 10 // The call to llvm.memcpy should have an "align 64" on the first argument |
11 __builtin_memcpy(__builtin_align_up(ptr, 64), data, 16); | 11 __builtin_memcpy(__builtin_align_up(ptr, 64), data, 16); |