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