diff options
author | Michael Forney <mforney@mforney.org> | 2021-04-08 13:04:53 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2021-07-02 01:01:57 -0700 |
commit | eb8232463e3b1b758ff9f8a1cfb89bca2f655db4 (patch) | |
tree | a2be1baff51249cb97c75a444c9bd18f18efcf50 /test/subtract-pointer.qbe | |
parent | 9d6020dc4a53ec66e09f84219c804f489634aa1a (diff) |
qbe: Remove more unnecessary copy instructions
Now that we don't track QBE types within values, we don't have to
worry about generating incorrect SSA when passing an 'l' value to
a function taking a 'w'. So we can just return the source value
instead of emitting a dummy copy instruction.
Diffstat (limited to 'test/subtract-pointer.qbe')
-rw-r--r-- | test/subtract-pointer.qbe | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/subtract-pointer.qbe b/test/subtract-pointer.qbe index 0e7e9a3..6c4bdde 100644 --- a/test/subtract-pointer.qbe +++ b/test/subtract-pointer.qbe @@ -7,10 +7,8 @@ function $f(l %.1, l %.3) { storel %.3, %.4 @body.2 %.5 =l loadl %.2 - %.6 =l copy %.5 - %.7 =l loadl %.4 - %.8 =l copy %.7 - %.9 =l sub %.6, %.8 - %.10 =l div %.9, 4 + %.6 =l loadl %.4 + %.7 =l sub %.5, %.6 + %.8 =l div %.7, 4 ret } |