// goes, they shouldn't affect whether the call is a tail call.
for (const auto &Attr : {Attribute::Alignment, Attribute::Dereferenceable,
Attribute::DereferenceableOrNull, Attribute::NoAlias,
- Attribute::NonNull}) {
+ Attribute::NonNull, Attribute::NoUndef}) {
CallerAttrs.removeAttribute(Attr);
CalleeAttrs.removeAttribute(Attr);
}
AttrBuilder CallerAttrs(F.getContext(), F.getAttributes().getRetAttrs());
for (const auto &Attr : {Attribute::Alignment, Attribute::Dereferenceable,
Attribute::DereferenceableOrNull, Attribute::NoAlias,
- Attribute::NonNull})
+ Attribute::NonNull, Attribute::NoUndef})
CallerAttrs.removeAttribute(Attr);
if (CallerAttrs.hasAttributes())
%ret = tail call align 8 i8* @foo()
ret i8* %ret
}
+
+
+define noundef i8* @test7() nounwind {
+; CHECK-LABEL: test7:
+; CHECK: # %bb.0:
+; CHECK-NEXT: jmp foo # TAILCALL
+ %ret = tail call i8* @foo()
+ ret i8* %ret
+}
+
+define i8* @test8() nounwind {
+; CHECK-LABEL: test8:
+; CHECK: # %bb.0:
+; CHECK-NEXT: jmp foo # TAILCALL
+ %ret = tail call noundef i8* @foo()
+ ret i8* %ret
+}