aboutsummaryrefslogtreecommitdiff
path: root/test/struct-flexible-array.qbe
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2022-05-09 12:57:57 -0700
committerMichael Forney <mforney@mforney.org>2022-05-09 13:05:22 -0700
commitfb00ba697821de4fb3d8d0dd44edfa5f4727d067 (patch)
tree33ac4c8a3b8fc64cd7386b03c9d01857f98fd638 /test/struct-flexible-array.qbe
parent70fe9ef1810cc6c05bde9eb0970363c35fa7e802 (diff)
expr: Use integer type for member access intermediate address calculation
Diffstat (limited to 'test/struct-flexible-array.qbe')
-rw-r--r--test/struct-flexible-array.qbe15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/struct-flexible-array.qbe b/test/struct-flexible-array.qbe
index 464bfa4..915b281 100644
--- a/test/struct-flexible-array.qbe
+++ b/test/struct-flexible-array.qbe
@@ -6,12 +6,11 @@ function w $f(l %.1) {
storel %.1, %.2
@body.2
%.3 =l loadl %.2
- %.4 =l mul 4, 1
- %.5 =l add %.3, %.4
- %.6 =l extsw 2
- %.7 =l mul %.6, 2
- %.8 =l add %.5, %.7
- %.9 =w loadsh %.8
- %.10 =w extsh %.9
- ret %.10
+ %.4 =l add %.3, 4
+ %.5 =l extsw 2
+ %.6 =l mul %.5, 2
+ %.7 =l add %.4, %.6
+ %.8 =w loadsh %.7
+ %.9 =w extsh %.8
+ ret %.9
}