Skip to content

Commit 57ca1e5

Browse files
committed
Fix tests to match data movement instead of stack allocation
1 parent c728e47 commit 57ca1e5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/assembly-llvm/reg-struct-return.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ mod Small {
5555

5656
// WITHOUT-LABEL: small_caller
5757
// WITHOUT: calll small
58-
// WITHOUT: subl $4, %esp
58+
// WITHOUT: movzwl {{.*}}(%esp), %e[[TMP:..]]
59+
// WITHOUT: movw %[[TMP]], (%e{{..}})
5960
*dst = small();
6061
}
6162
}
@@ -98,7 +99,8 @@ mod Pivot {
9899

99100
// WITHOUT-LABEL: pivot_caller
100101
// WITHOUT: calll pivot
101-
// WITHOUT: subl $4, %esp
102+
// WITHOUT: movsd {{.*}}(%esp), %[[TMP:xmm.]]
103+
// WITHOUT: movsd %[[TMP]], (%e{{..}})
102104
*dst = pivot();
103105
}
104106
}
@@ -133,7 +135,10 @@ mod Large {
133135
pub unsafe extern "C" fn large_caller(dst: &mut LargeStruct) {
134136
// CHECK-LABEL: large_caller
135137
// CHECK: calll large
136-
// CHECK: subl $4, %esp
138+
// CHECK-DAG: movl {{.*}}(%esp), %[[TMP1:e..]]
139+
// CHECK-DAG: movl %[[TMP1]], {{.*}}(%e{{..}})
140+
// CHECK-DAG: movsd {{.*}}(%esp), %[[TMP2:xmm.]]
141+
// CHECK-DAG: movsd %[[TMP2]], {{.*}}(%e{{..}})
137142
*dst = large();
138143
}
139144
}

0 commit comments

Comments
 (0)