const AttrConst VarArgsIncompatible = {StructRet_i};
/// @brief Attributes that are mutually incompatible.
-const AttrConst MutuallyIncompatible[4] = {
- {ByVal_i | InReg_i | Nest_i | StructRet_i},
+const AttrConst MutuallyIncompatible[5] = {
+ {ByVal_i | Nest_i | StructRet_i},
+ {ByVal_i | Nest_i | InReg_i },
{ZExt_i | SExt_i},
{ReadNone_i | ReadOnly_i},
{NoInline_i | AlwaysInline_i}
--- /dev/null
+; RUN: llc < %s -march=x86 | FileCheck %s
+
+%struct.s = type { double, float }
+
+define void @g() nounwind {
+entry:
+ %tmp = alloca %struct.s, align 4
+ call void @f(%struct.s* inreg sret %tmp, i32 inreg 41, i32 inreg 42, i32 43)
+ ret void
+ ; CHECK: g:
+ ; CHECK: subl {{.*}}, %esp
+ ; CHECK-NEXT: $43, (%esp)
+ ; CHECK-NEXT: leal 16(%esp), %eax
+ ; CHECK-NEXT: movl $41, %edx
+ ; CHECK-NEXT: movl $42, %ecx
+ ; CHECK-NEXT: calll f
+}
+
+declare void @f(%struct.s* inreg sret, i32 inreg, i32 inreg, i32)