[MergeFuncs] Fix callsite attributes in thunk generation
[oota-llvm.git] / test / Transforms / MergeFunc / apply_function_attributes.ll
index fa7f052f7ffd0244375949c06b2795c0253cf21d..e9ede4518206a3e20091e6916c5fac224e00a92f 100644 (file)
@@ -38,3 +38,10 @@ define void @A(%Opaque_type* sret %a, %D2i* %b, i32* %xp, i32* %yp) {
 ; CHECK:  tail call void bitcast (void (%Opaque_type*, %D2i*, i32*, i32*)* @A to void (%Opaque_type*, %S2i*, i32*, i32*)*)(%Opaque_type* sret %0, %S2i* %1, i32* %2, i32* %3)
 ; CHECK:  ret void
 
+
+; Make sure we transfer the parameter attributes to the call site.
+; CHECK-LABEL: define void @B(%Opaque_type* sret
+; CHECK:  %5 = bitcast
+; CHECK:  tail call void @A(%Opaque_type* sret %0, %D2i* %5, i32* %2, i32* %3)
+; CHECK:  ret void
+