llvm.org GIT mirror llvm / 259f88e
Verify that the alignment argument to llvm.memcpy is a constant integer, PR2318. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55228 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
2 changed file(s) with 21 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
12711271
12721272 switch (ID) {
12731273 default:
1274 break;
1275 case Intrinsic::memcpy_i32:
1276 case Intrinsic::memcpy_i64:
1277 case Intrinsic::memmove_i32:
1278 case Intrinsic::memmove_i64:
1279 case Intrinsic::memset_i32:
1280 case Intrinsic::memset_i64:
1281 Assert1(isa(CI.getOperand(4)),
1282 "alignment argument of memory intrinsics must be a constant int",
1283 &CI);
12741284 break;
12751285 case Intrinsic::init_trampoline:
12761286 Assert1(isa(CI.getOperand(2)->stripPointerCasts()),
0 ; RUN: not llvm-as -f %s -o /dev/null |& grep {alignment argument of memory intrinsics must be a constant int}
1 ; PR2318
2
3 define void @x(i8* %a, i8* %src, i64 %len, i32 %align) nounwind {
4 entry:
5 tail call void @llvm.memcpy.i64( i8* %a, i8* %src, i64 %len, i32 %align) nounwind
6 ret void
7 }
8
9 declare void @llvm.memcpy.i64( i8* %a, i8* %src, i64 %len, i32)
10