1; RUN: not llvm-as -disable-output %s 2>&1 | FileCheck %s 2 3; CHECK: 'nofpclass(nan)' applied to incompatible type! 4; CHECK-NEXT: ptr @nofpclass_int_return 5define nofpclass(nan) i32 @nofpclass_int_return(i32 %arg) { 6 ret i32 %arg 7} 8 9; CHECK: 'nofpclass(nan)' applied to incompatible type! 10; CHECK-NEXT: ptr @nofpclass_int_param 11define i32 @nofpclass_int_param(i32 nofpclass(nan) %arg) { 12 ret i32 %arg 13} 14 15; CHECK: 'nofpclass(zero)' applied to incompatible type! 16; CHECK-NEXT: ptr @nofpclass_int_ret_decl 17declare nofpclass(zero) i32 @nofpclass_int_ret_decl() 18 19; CHECK: 'nofpclass(inf)' applied to incompatible type! 20; CHECK-NEXT: ptr @nofpclass_int_arg_decl 21declare i32 @nofpclass_int_arg_decl(i32 nofpclass(inf)) 22 23 24; CHECK: 'nofpclass(nan)' applied to incompatible type! 25; CHECK-NEXT: ptr @nofpclass_vector_int 26; CHECK-NEXT: 'nofpclass(zero)' applied to incompatible type! 27; CHECK-NEXT: ptr @nofpclass_vector_int 28define nofpclass(nan) <4 x i32> @nofpclass_vector_int(<4 x i32> nofpclass(zero) %arg) { 29 ret <4 x i32> %arg 30} 31 32; CHECK: 'nofpclass(nan)' applied to incompatible type! 33; CHECK-NEXT: ptr @nofpclass_array_int 34; CHECK-NEXT: 'nofpclass(zero)' applied to incompatible type! 35; CHECK-NEXT: ptr @nofpclass_array_int 36define nofpclass(nan) [4 x i32] @nofpclass_array_int([4 x i32] nofpclass(zero) %arg) { 37 ret [4 x i32] %arg 38} 39 40; CHECK: 'nofpclass(nan)' applied to incompatible type! 41; CHECK-NEXT: ptr @nofpclass_vector_array_int 42; CHECK-NEXT: 'nofpclass(zero)' applied to incompatible type! 43; CHECK-NEXT: ptr @nofpclass_vector_array_int 44define nofpclass(nan) [4 x <8 x i32>] @nofpclass_vector_array_int([4 x <8 x i32>] nofpclass(zero) %arg) { 45 ret [4 x <8 x i32>] %arg 46} 47 48%opaque = type opaque 49 50; CHECK: 'nofpclass(nan)' applied to incompatible type! 51; CHECK-NEXT: ptr @nofpclass_opaque_type 52; CHECK-NEXT: 'nofpclass(zero)' applied to incompatible type! 53; CHECK-NEXT: ptr @nofpclass_opaque_type 54define nofpclass(nan) %opaque @nofpclass_opaque_type(%opaque nofpclass(zero) %arg) { 55 ret %opaque %arg 56} 57 58%struct = type { i32, float } 59 60; CHECK: 'nofpclass(nan)' applied to incompatible type! 61; CHECK-NEXT: ptr @nofpclass_struct 62; CHECK-NEXT: 'nofpclass(zero)' applied to incompatible type! 63; CHECK-NEXT: ptr @nofpclass_struct 64define nofpclass(nan) %struct @nofpclass_struct(%struct nofpclass(zero) %arg) { 65 ret %struct %arg 66} 67