From fb00ba697821de4fb3d8d0dd44edfa5f4727d067 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 9 May 2022 12:57:57 -0700 Subject: expr: Use integer type for member access intermediate address calculation --- test/struct-flexible-array.qbe | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'test/struct-flexible-array.qbe') 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 } -- cgit v1.2.3