diff options
author | Michael Forney <mforney@mforney.org> | 2021-04-08 12:18:12 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2021-04-08 12:22:16 -0700 |
commit | 0c2e1bf9b32bd429bd01f0baec6893afd372d354 (patch) | |
tree | 8449f10611a4ce94ea42d66ae8cb65fdef6e35a7 /test | |
parent | a6dc22cc3c706d6732a8251501007e4fffcfc256 (diff) |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/struct-return-2.qbe | 11 |
1 files changed, 5 insertions, 6 deletions
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 } |