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/compare-char.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/compare-char.qbe')
-rw-r--r-- | test/compare-char.qbe | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/compare-char.qbe b/test/compare-char.qbe index 33ccd4c..6cd4c7a 100644 --- a/test/compare-char.qbe +++ b/test/compare-char.qbe @@ -2,10 +2,8 @@ export function w $main() { @start.1 @body.2 - %.1 =w copy 0 - %.2 =w extub %.1 - %.3 =w copy 256 - %.4 =w extub %.3 - %.5 =w csltw %.2, %.4 - ret %.5 + %.1 =w extub 0 + %.2 =w extub 256 + %.3 =w csltw %.1, %.2 + ret %.3 } |