From 0c2e1bf9b32bd429bd01f0baec6893afd372d354 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Thu, 8 Apr 2021 12:18:12 -0700 Subject: qbe: Remove unnecessary value copy for struct/union types Previously, this was needed so that an aggregate type value was updated to be an 'l' type value. However, since 5ff1d2fa the aggregate type name is stored in a separate parameter in IARG/ICALL instructions, so we can just re-use the same pointer value. --- test/struct-return-2.qbe | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/struct-return-2.qbe b/test/struct-return-2.qbe index 415ec2f..3e5a544 100644 --- a/test/struct-return-2.qbe +++ b/test/struct-return-2.qbe @@ -5,10 +5,9 @@ function w $f() { @body.2 %.1 =:.1 call $g() %.2 =l copy %.1 - %.3 =l copy %.2 - %.4 =l mul 4, 1 - %.5 =l add %.3, %.4 - %.6 =l copy %.5 - %.7 =w loadsw %.6 - ret %.7 + %.3 =l mul 4, 1 + %.4 =l add %.2, %.3 + %.5 =l copy %.4 + %.6 =w loadsw %.5 + ret %.6 } -- cgit v1.2.3