holey-bytes/lang/tests/son_tests_inlining_issues.txt
Jakub Doka 48a0c8d0b9
POC for removeing needless stack offset computes when only value is used
TBD: there are far more cases where this will apply

Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
2024-12-15 17:17:41 +01:00

102 lines
2.1 KiB
Plaintext

main:
ADDI64 r254, r254, -98d
ST r31, r254, 58a, 40h
ADDI64 r32, r254, 33d
ADDI64 r33, r254, 34d
ST r32, r254, 34a, 8h
LI64 r34, 100d
LI8 r35, 1b
ST r0, r254, 1a, 8h
ST r0, r254, 17a, 8h
ST r34, r254, 42a, 8h
ST r35, r254, 0a, 1h
ST r0, r254, 9a, 8h
ST r0, r254, 25a, 8h
ST r34, r254, 50a, 8h
ST r0, r254, 33a, 1h
CP r2, r33
LD r3, r254, 17a, 16h
LD r5, r254, 1a, 16h
LD r7, r254, 0a, 1h
JAL r31, r0, :put_filled_rect
LD r31, r254, 58a, 40h
ADDI64 r254, r254, 98d
JALA r0, r31, 0a
put_filled_rect:
ADDI64 r254, r254, -108d
CP r14, r2
ST r3, r254, 92a, 16h
ADDI64 r3, r254, 92d
CP r15, r3
ST r5, r254, 76a, 16h
ADDI64 r5, r254, 76d
CP r13, r5
ST r7, r254, 75a, 1h
ADDI64 r7, r254, 75d
CP r16, r7
ADDI64 r17, r254, 25d
LI8 r18, 5b
ST r18, r254, 25a, 1h
LD r19, r13, 0a, 8h
ST r19, r254, 26a, 4h
LI64 r20, 1d
ST r20, r254, 30a, 4h
ST r16, r254, 34a, 8h
LI64 r21, 25d
ADDI64 r22, r254, 50d
ST r18, r254, 50a, 1h
ST r19, r254, 51a, 4h
ST r20, r254, 55a, 4h
ST r16, r254, 59a, 8h
LI64 r23, 2d
LI64 r24, 8d
LD r25, r15, 8a, 8h
LD r13, r13, 8a, 8h
ADD64 r26, r13, r25
SUB64 r26, r26, r20
LD r27, r14, 8a, 8h
MUL64 r26, r27, r26
LD r14, r14, 0a, 8h
ADD64 r26, r14, r26
LD r28, r15, 0a, 8h
ADD64 r15, r28, r26
MUL64 r25, r27, r25
ADD64 r14, r14, r25
ADD64 r14, r28, r14
3: JGTU r13, r20, :0
JNE r13, r20, :1
ADDI64 r13, r254, 0d
ST r18, r254, 0a, 1h
ST r19, r254, 1a, 4h
ST r20, r254, 5a, 4h
ST r16, r254, 9a, 8h
ST r14, r254, 17a, 8h
CP r2, r24
CP r3, r23
CP r4, r13
CP r5, r21
ECA
JMP :1
1: JMP :2
0: ST r14, r254, 67a, 8h
CP r2, r24
CP r3, r23
CP r4, r22
CP r5, r21
ECA
ST r15, r254, 42a, 8h
CP r2, r24
CP r3, r23
CP r4, r17
CP r5, r21
ECA
SUB64 r13, r13, r23
SUB64 r15, r15, r27
ADD64 r14, r27, r14
JMP :3
2: ADDI64 r254, r254, 108d
JALA r0, r31, 0a
code size: 842
ret: 0
status: Ok(())