1; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s 2 3declare i8* @foo() 4 5define void @f1() { 6entry: 7 call i8* @foo(), !align !{i64 2} 8 ret void 9} 10; CHECK: align applies only to load instructions 11; CHECK-NEXT: call i8* @foo() 12 13define i8 @f2(i8* %x) { 14entry: 15 %y = load i8, i8* %x, !align !{i64 2} 16 ret i8 %y 17} 18; CHECK: align applies only to pointer types 19; CHECK-NEXT: load i8, i8* %x 20 21define i8* @f3(i8** %x) { 22entry: 23 %y = load i8*, i8** %x, !align !{} 24 ret i8* %y 25} 26; CHECK: align takes one operand 27; CHECK-NEXT: load i8*, i8** %x 28 29define i8* @f4(i8** %x) { 30entry: 31 %y = load i8*, i8** %x, !align !{!"str"} 32 ret i8* %y 33} 34; CHECK: align metadata value must be an i64! 35; CHECK-NEXT: load i8*, i8** %x 36 37define i8* @f5(i8** %x) { 38entry: 39 %y = load i8*, i8** %x, !align !{i32 2} 40 ret i8* %y 41} 42; CHECK: align metadata value must be an i64! 43; CHECK-NEXT: load i8*, i8** %x 44 45define i8* @f6(i8** %x) { 46entry: 47 %y = load i8*, i8** %x, !align !{i64 3} 48 ret i8* %y 49} 50; CHECK: align metadata value must be a power of 2! 51; CHECK-NEXT: load i8*, i8** %x 52 53define i8* @f7(i8** %x) { 54entry: 55 %y = load i8*, i8** %x, !align !{i64 1073741824} 56 ret i8* %y 57} 58; CHECK: alignment is larger that implementation defined limit 59; CHECK-NEXT: load i8*, i8** %x