1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s
4 declare void @llvm.assume(i1)
6 define void @func(ptr %P, i32 %P1, ptr %P2, ptr %P3) {
7 ; CHECK: tags must be valid attribute names
9 call void @llvm.assume(i1 true) ["adazdazd"()]
10 ; CHECK: the second argument should be a constant integral value
11 call void @llvm.assume(i1 true) ["dereferenceable"(ptr %P, i32 %P1)]
12 ; CHECK: too many arguments
13 call void @llvm.assume(i1 true) ["dereferenceable"(ptr %P, i32 8, i32 8)]
14 ; CHECK: this attribute should have 2 arguments
15 call void @llvm.assume(i1 true) ["dereferenceable"(ptr %P)]
16 ; CHECK: this attribute has no argument
17 call void @llvm.assume(i1 true) ["dereferenceable"(ptr %P, i32 4), "cold"(ptr %P)]
18 ; CHECK: this attribute should have one argument
19 call void @llvm.assume(i1 true) ["noalias"()]
20 call void @llvm.assume(i1 true) ["align"(ptr %P, i32 %P1, i32 4)]
21 ; CHECK: alignment assumptions should have 2 or 3 arguments
22 call void @llvm.assume(i1 true) ["align"(ptr %P, i32 %P1, i32 4, i32 4)]
23 ; CHECK: second argument should be an integer
24 call void @llvm.assume(i1 true) ["align"(ptr %P, ptr %P2)]
25 ; CHECK: third argument should be an integer if present
26 call void @llvm.assume(i1 true) ["align"(ptr %P, i32 %P1, ptr %P2)]
27 ; CHECK: separate_storage assumptions should have 2 arguments
28 call void @llvm.assume(i1 true) ["separate_storage"(ptr %P)]
29 ; CHECK: arguments to separate_storage assumptions should be pointers
30 call void @llvm.assume(i1 true) ["separate_storage"(ptr %P, i32 123)]