musttail: Fix the verification of alignment attributes
[oota-llvm.git] / test / Verifier / musttail-invalid.ll
index 7e427b50465aabaca45c96c20734e4e615eb8a4a..e5f9a404b9e3ad93b47128a3ced5fc412abb77ed 100644 (file)
@@ -60,6 +60,13 @@ define void @mismatched_sret(i32* %a) {
   ret void
 }
 
+declare void @mismatched_alignment_callee(i32* byval align 8)
+define void @mismatched_alignment(i32* byval align 4 %a) {
+; CHECK: mismatched ABI impacting function attributes
+  musttail call void @mismatched_alignment_callee(i32* byval align 8 %a)
+  ret void
+}
+
 declare i32 @not_tail_pos_callee()
 define i32 @not_tail_pos() {
 ; CHECK: musttail call must be precede a ret with an optional bitcast