From 11925ff91792df023940c1c7fb203bb6d38fcc6e Mon Sep 17 00:00:00 2001 From: Csaba Hruska Date: Wed, 21 Mar 2018 07:58:07 +0100 Subject: [PATCH] update ghc codegen sample to use the same input that grin optimise --- playground/sum/sum-ghc-8.4.1-llvm-O0.s | 845 ++++++++++++++---- playground/sum/sum-ghc-8.4.1-llvm-O3.s | 790 ++++++++++++---- playground/sum/sum-ghc-8.4.1.ll | 1141 ++++++++++++++++++------ playground/sum/sum-ghc-native-O2.asm | 672 ++++++++++++++ playground/sum/sum.asm | 267 ------ playground/sum/sum.hs | 21 +- 6 files changed, 2862 insertions(+), 874 deletions(-) create mode 100644 playground/sum/sum-ghc-native-O2.asm delete mode 100644 playground/sum/sum.asm diff --git a/playground/sum/sum-ghc-8.4.1-llvm-O0.s b/playground/sum/sum-ghc-8.4.1-llvm-O0.s index 7271bf15..b795ebd4 100644 --- a/playground/sum/sum-ghc-8.4.1-llvm-O0.s +++ b/playground/sum/sum-ghc-8.4.1-llvm-O0.s @@ -1,105 +1,306 @@ .text - .file "sum.ll" - .globl Sum_zdwsum_info$def # -- Begin function Sum_zdwsum_info$def + .file "SumSimpleBasic.ll" + .globl SumSimpleBasic_zdwsum_info$def # -- Begin function SumSimpleBasic_zdwsum_info$def .p2align 4, 0x90 - .type Sum_zdwsum_info$def,@function - .quad 12884901904 # @"Sum_zdwsum_info$def" - # 0x300000010 + .type SumSimpleBasic_zdwsum_info$def,@function + .quad 4294967301 # @"SumSimpleBasic_zdwsum_info$def" + # 0x100000005 .quad 0 # 0x0 .quad 14 # 0xe -Sum_zdwsum_info$def: -# BB#0: # %c3is - movq %rbx, -24(%rsp) - movq %rdi, -16(%rsp) - movq %rsi, -32(%rsp) - movq %r14, -40(%rsp) - jmp .LBB0_1 - .p2align 4, 0x90 -.LBB0_2: # %c3iq - # in Loop: Header=BB0_1 Depth=1 - movq -32(%rsp), %rax - movq -40(%rsp), %rcx - addq %rax, %rcx - movq %rcx, -8(%rsp) - incq %rax - movq %rax, -32(%rsp) - movq %rcx, -40(%rsp) -.LBB0_1: # %c3ik - # =>This Inner Loop Header: Depth=1 - movq -32(%rsp), %rax - cmpq -16(%rsp), %rax - jle .LBB0_2 -# BB#3: # %c3ir - movq -40(%rsp), %rbx - movq %rbx, -24(%rsp) - movq (%rbp), %rax +SumSimpleBasic_zdwsum_info$def: +# BB#0: # %c3kG + movq %rbx, -16(%rsp) + movq %rbp, -24(%rsp) + movq %r14, -8(%rsp) + addq $-16, %rbp + cmpq %r15, %rbp + jae .LBB0_1 +# BB#3: # %c3kH + movq -8(%rsp), %r14 + movq $SumSimpleBasic_zdwsum_closure$def, -16(%rsp) + movq -8(%r13), %rax + movq -24(%rsp), %rbp + movl $SumSimpleBasic_zdwsum_closure$def, %ebx + jmpq *%rax # TAILCALL +.LBB0_1: # %c3kI + movq -24(%rsp), %rax + movq $c3kz_info$def, -8(%rax) + movq -8(%rsp), %rax + movq %rax, -16(%rsp) + addq $-8, -24(%rsp) + testb $7, -16(%rsp) + je .LBB0_4 +# BB#2: # %u3l2 + movq -24(%rsp), %rbp + movq -16(%rsp), %rbx + jmp c3kz_info$def # TAILCALL +.LBB0_4: # %c3kA + movq -16(%rsp), %rbx + movq (%rbx), %rax + movq -24(%rsp), %rbp jmpq *%rax # TAILCALL .Lfunc_end0: - .size Sum_zdwsum_info$def, .Lfunc_end0-Sum_zdwsum_info$def + .size SumSimpleBasic_zdwsum_info$def, .Lfunc_end0-SumSimpleBasic_zdwsum_info$def # -- End function - .globl Sum_hszusumzupure2_info$def # -- Begin function Sum_hszusumzupure2_info$def + .p2align 4, 0x90 # -- Begin function c3kz_info$def + .type c3kz_info$def,@function + .quad 0 # @"c3kz_info$def" + # 0x0 + .quad 30 # 0x1e +c3kz_info$def: +# BB#0: # %c3kz + movq %rbx, -16(%rsp) + movq %rbp, -24(%rsp) + andl $7, %ebx + cmpq $2, %rbx + jne .LBB1_3 +# BB#1: # %c3kE + movq -24(%rsp), %rax + movq $c3kO_info$def, -8(%rax) + movq -16(%rsp), %rax + movq 14(%rax), %rcx + movq %rcx, -8(%rsp) + movq 6(%rax), %rax + movq %rax, -16(%rsp) + movq -24(%rsp), %rax + movq %rcx, (%rax) + addq $-8, -24(%rsp) + testb $7, -16(%rsp) + je .LBB1_4 +# BB#2: # %u3l1 + movq -24(%rsp), %rbp + movq -16(%rsp), %rbx + jmp c3kO_info$def # TAILCALL +.LBB1_3: # %c3kD + movq $0, -16(%rsp) + movq -24(%rsp), %rax + leaq 8(%rax), %rbp + movq %rbp, -24(%rsp) + movq 8(%rax), %rax + xorl %ebx, %ebx + jmpq *%rax # TAILCALL +.LBB1_4: # %c3kP + movq -16(%rsp), %rbx + movq (%rbx), %rax + movq -24(%rsp), %rbp + jmpq *%rax # TAILCALL +.Lfunc_end1: + .size c3kz_info$def, .Lfunc_end1-c3kz_info$def + # -- End function + .p2align 4, 0x90 # -- Begin function c3kO_info$def + .type c3kO_info$def,@function + .quad 1 # @"c3kO_info$def" + # 0x1 + .quad 30 # 0x1e +c3kO_info$def: +# BB#0: # %c3kO + movq $c3kT_info$def, (%rbp) + movq 8(%rbp), %rax + movq %rax, -8(%rsp) + movq 7(%rbx), %rax + movq %rax, 8(%rbp) + movq -8(%rsp), %r14 + jmp SumSimpleBasic_zdwsum_info$def # TAILCALL +.Lfunc_end2: + .size c3kO_info$def, .Lfunc_end2-c3kO_info$def + # -- End function + .p2align 4, 0x90 # -- Begin function c3kT_info$def + .type c3kT_info$def,@function + .quad 65 # @"c3kT_info$def" + # 0x41 + .quad 30 # 0x1e +c3kT_info$def: +# BB#0: # %c3kT + movq %rbx, -8(%rsp) + movq %rbp, -16(%rsp) + addq 8(%rbp), %rbx + movq %rbx, -8(%rsp) + leaq 16(%rbp), %rax + movq %rax, -16(%rsp) + movq 16(%rbp), %rcx + movq %rax, %rbp + jmpq *%rcx # TAILCALL +.Lfunc_end3: + .size c3kT_info$def, .Lfunc_end3-c3kT_info$def + # -- End function + .p2align 4, 0x90 # -- Begin function s3kp_info$def + .type s3kp_info$def,@function + .quad 8589934592 # @"s3kp_info$def" + # 0x200000000 + .quad 20 # 0x14 +s3kp_info$def: +# BB#0: # %c3n4 + movq %rbp, -32(%rsp) + movq %rbx, -24(%rsp) + addq $-16, %rbp + cmpq %r15, %rbp + jae .LBB4_1 +# BB#2: # %c3n5 + movq -24(%rsp), %rbx + movq -16(%r13), %rax + movq -32(%rsp), %rbp + jmpq *%rax # TAILCALL +.LBB4_1: # %c3n6 + movq -32(%rsp), %rax + movq $stg_upd_frame_info, -16(%rax) + movq -24(%rsp), %rax + movq -32(%rsp), %rcx + movq %rax, -8(%rcx) + movq -24(%rsp), %rbx + movq 24(%rbx), %rsi + movq %rsi, -8(%rsp) + movq 16(%rbx), %r14 + incq %r14 + movq %r14, -16(%rsp) + movq -32(%rsp), %rbp + addq $-16, %rbp + movq %rbp, -32(%rsp) + jmp SumSimpleBasic_zdwupto_info$def # TAILCALL +.Lfunc_end4: + .size s3kp_info$def, .Lfunc_end4-s3kp_info$def + # -- End function + .globl SumSimpleBasic_zdwupto_info$def # -- Begin function SumSimpleBasic_zdwupto_info$def .p2align 4, 0x90 - .type Sum_hszusumzupure2_info$def,@function - .quad 0 # @"Sum_hszusumzupure2_info$def" + .type SumSimpleBasic_zdwupto_info$def,@function + .quad 8589934604 # @"SumSimpleBasic_zdwupto_info$def" + # 0x20000000c + .quad 0 # 0x0 + .quad 14 # 0xe +SumSimpleBasic_zdwupto_info$def: +# BB#0: # %c3na + movq %rbx, -8(%rsp) + movq %rsi, -16(%rsp) + movq %r14, -24(%rsp) + addq $72, %r12 + movq %r12, -32(%rsp) + cmpq 856(%r13), %r12 + jbe .LBB5_1 +# BB#3: # %c3ne + movq $72, 904(%r13) + movq -16(%rsp), %rsi + movq -24(%rsp), %r14 + movq $SumSimpleBasic_zdwupto_closure$def, -8(%rsp) + movq -8(%r13), %rax + movq -32(%rsp), %r12 + movl $SumSimpleBasic_zdwupto_closure$def, %ebx + jmpq *%rax # TAILCALL +.LBB5_1: # %c3nd + movq -24(%rsp), %rax + cmpq -16(%rsp), %rax + jle .LBB5_4 +# BB#2: # %c3n9 + movq -32(%rsp), %r12 + addq $-72, %r12 + movq %r12, -32(%rsp) + movq $SumSimpleBasic_Nil_closure+1, -8(%rsp) + movq (%rbp), %rax + movl $SumSimpleBasic_Nil_closure+1, %ebx + jmpq *%rax # TAILCALL +.LBB5_4: # %c3n8 + movq -32(%rsp), %rax + movq $s3kp_info$def, -64(%rax) + movq -24(%rsp), %rax + movq -32(%rsp), %rcx + movq %rax, -48(%rcx) + movq -16(%rsp), %rax + movq -32(%rsp), %rcx + movq %rax, -40(%rcx) + movq -32(%rsp), %rax + movq $ghczmprim_GHCziTypes_Izh_con_info, -32(%rax) + movq -24(%rsp), %rax + movq -32(%rsp), %rcx + movq %rax, -24(%rcx) + movq -32(%rsp), %rax + movq $SumSimpleBasic_Cons_con_info, -16(%rax) + movq -32(%rsp), %rax + leaq -31(%rax), %rcx + movq %rcx, -8(%rax) + movq -32(%rsp), %rax + leaq -64(%rax), %rcx + movq %rcx, (%rax) + movq -32(%rsp), %r12 + leaq -14(%r12), %rbx + movq %rbx, -8(%rsp) + movq (%rbp), %rax + jmpq *%rax # TAILCALL +.Lfunc_end5: + .size SumSimpleBasic_zdwupto_info$def, .Lfunc_end5-SumSimpleBasic_zdwupto_info$def + # -- End function + .globl SumSimpleBasic_hszusumzupure2_info$def # -- Begin function SumSimpleBasic_hszusumzupure2_info$def + .p2align 4, 0x90 + .type SumSimpleBasic_hszusumzupure2_info$def,@function + .quad 0 # @"SumSimpleBasic_hszusumzupure2_info$def" # 0x0 .quad 21 # 0x15 -Sum_hszusumzupure2_info$def: -# BB#0: # %c3iY +SumSimpleBasic_hszusumzupure2_info$def: +# BB#0: # %c3pj subq $136, %rsp movq %rbp, (%rsp) movq %rbx, 8(%rsp) addq $-24, %rbp cmpq %r15, %rbp - jae .LBB1_1 -# BB#4: # %c3j4 + jae .LBB6_1 +# BB#4: # %c3pt movq 8(%rsp), %rbx movq -16(%r13), %rax - jmp .LBB1_3 -.LBB1_1: # %c3j5 + jmp .LBB6_3 +.LBB6_1: # %c3pu movq 8(%rsp), %rsi movq %r13, %rdi callq newCAF movq %rax, 16(%rsp) testq %rax, %rax - je .LBB1_2 -# BB#5: # %c3iU + je .LBB6_2 +# BB#5: # %c3pf movq (%rsp), %rax movq $stg_bh_upd_frame_info, -16(%rax) movq 16(%rsp), %rax movq (%rsp), %rcx movq %rax, -8(%rcx) movq (%rsp), %rax - movq $c3iW_info$def, -24(%rax) + movq $c3ph_info$def, -24(%rax) movq $100000, 32(%rsp) # imm = 0x186A0 - movq $1, 40(%rsp) - movq $0, 24(%rsp) + movq $1, 24(%rsp) movq (%rsp), %rbp addq $-24, %rbp movq %rbp, (%rsp) movq 8(%rsp), %rbx - xorl %r14d, %r14d - movl $1, %esi - movl $100000, %edi # imm = 0x186A0 + movl $1, %r14d + movl $100000, %esi # imm = 0x186A0 addq $136, %rsp - jmp Sum_zdwsum_info$def # TAILCALL -.LBB1_2: # %c3iV + jmp SumSimpleBasic_zdwupto_info$def # TAILCALL +.LBB6_2: # %c3pg movq 8(%rsp), %rbx movq (%rbx), %rax -.LBB1_3: # %c3iV +.LBB6_3: # %c3pg movq (%rsp), %rbp addq $136, %rsp jmpq *%rax # TAILCALL -.Lfunc_end1: - .size Sum_hszusumzupure2_info$def, .Lfunc_end1-Sum_hszusumzupure2_info$def +.Lfunc_end6: + .size SumSimpleBasic_hszusumzupure2_info$def, .Lfunc_end6-SumSimpleBasic_hszusumzupure2_info$def # -- End function - .p2align 4, 0x90 # -- Begin function c3iW_info$def - .type c3iW_info$def,@function - .quad 0 # @"c3iW_info$def" + .p2align 4, 0x90 # -- Begin function c3ph_info$def + .type c3ph_info$def,@function + .quad 0 # @"c3ph_info$def" # 0x0 .quad 30 # 0x1e -c3iW_info$def: -# BB#0: # %c3iW - movq $c3j1_info$def, (%rbp) +c3ph_info$def: +# BB#0: # %c3ph + movq $c3pm_info$def, (%rbp) + movq %rbx, -8(%rsp) + movq %rbx, %r14 + jmp SumSimpleBasic_zdwsum_info$def # TAILCALL +.Lfunc_end7: + .size c3ph_info$def, .Lfunc_end7-c3ph_info$def + # -- End function + .p2align 4, 0x90 # -- Begin function c3pm_info$def + .type c3pm_info$def,@function + .quad 0 # @"c3pm_info$def" + # 0x0 + .quad 30 # 0x1e +c3pm_info$def: +# BB#0: # %c3pm + movq $c3pq_info$def, (%rbp) movq $ghczmprim_GHCziTypes_ZMZN_closure+1, -8(%rsp) movq %rbx, -16(%rsp) movq $0, -24(%rsp) @@ -107,31 +308,31 @@ c3iW_info$def: movl $ghczmprim_GHCziTypes_ZMZN_closure+1, %edi movq %rbx, %rsi jmp base_GHCziShow_zdwshowSignedInt_info # TAILCALL -.Lfunc_end2: - .size c3iW_info$def, .Lfunc_end2-c3iW_info$def +.Lfunc_end8: + .size c3pm_info$def, .Lfunc_end8-c3pm_info$def # -- End function - .p2align 4, 0x90 # -- Begin function c3j1_info$def - .type c3j1_info$def,@function - .quad 0 # @"c3j1_info$def" + .p2align 4, 0x90 # -- Begin function c3pq_info$def + .type c3pq_info$def,@function + .quad 0 # @"c3pq_info$def" # 0x0 .quad 30 # 0x1e -c3j1_info$def: -# BB#0: # %c3j1 +c3pq_info$def: +# BB#0: # %c3pq movq %rbx, -16(%rsp) movq %rbp, -24(%rsp) movq %r14, -8(%rsp) addq $24, %r12 movq %r12, -32(%rsp) cmpq 856(%r13), %r12 - jbe .LBB3_1 -# BB#2: # %c3j9 + jbe .LBB9_1 +# BB#2: # %c3pz movq $24, 904(%r13) movq -8(%rsp), %r14 movq -16(%rsp), %rbx movq -24(%rsp), %rbp movq -32(%rsp), %r12 jmp stg_gc_pp # TAILCALL -.LBB3_1: # %c3j8 +.LBB9_1: # %c3py movq -32(%rsp), %rax movq $ghczmprim_GHCziTypes_ZC_con_info, -16(%rax) movq -16(%rsp), %rax @@ -148,145 +349,413 @@ c3j1_info$def: movq %rbp, -24(%rsp) movq 8(%rax), %rax jmpq *%rax # TAILCALL -.Lfunc_end3: - .size c3j1_info$def, .Lfunc_end3-c3j1_info$def +.Lfunc_end9: + .size c3pq_info$def, .Lfunc_end9-c3pq_info$def # -- End function - .globl Sum_hszusumzupure1_info$def # -- Begin function Sum_hszusumzupure1_info$def + .globl SumSimpleBasic_hszusumzupure1_info$def # -- Begin function SumSimpleBasic_hszusumzupure1_info$def .p2align 4, 0x90 - .type Sum_hszusumzupure1_info$def,@function - .quad S3kT_srt-Sum_hszusumzupure1_info$def # @"Sum_hszusumzupure1_info$def" + .type SumSimpleBasic_hszusumzupure1_info$def,@function + .quad S3rl_srt-SumSimpleBasic_hszusumzupure1_info$def # @"SumSimpleBasic_hszusumzupure1_info$def" .quad 4294967299 # 0x100000003 .quad 0 # 0x0 .quad 30064771086 # 0x70000000e -Sum_hszusumzupure1_info$def: -# BB#0: # %c3kQ +SumSimpleBasic_hszusumzupure1_info$def: +# BB#0: # %c3ri movq $ghczmprim_GHCziTypes_True_closure+2, -8(%rsp) - movq $Sum_hszusumzupure2_closure$def, -16(%rsp) + movq $SumSimpleBasic_hszusumzupure2_closure$def, -16(%rsp) movq $base_GHCziIOziHandleziFD_stdout_closure, -24(%rsp) movl $base_GHCziIOziHandleziFD_stdout_closure, %r14d - movl $Sum_hszusumzupure2_closure$def, %esi + movl $SumSimpleBasic_hszusumzupure2_closure$def, %esi movl $ghczmprim_GHCziTypes_True_closure+2, %edi jmp base_GHCziIOziHandleziText_hPutStr2_info # TAILCALL -.Lfunc_end4: - .size Sum_hszusumzupure1_info$def, .Lfunc_end4-Sum_hszusumzupure1_info$def +.Lfunc_end10: + .size SumSimpleBasic_hszusumzupure1_info$def, .Lfunc_end10-SumSimpleBasic_hszusumzupure1_info$def # -- End function - .globl Sum_hszusumzupure_info$def # -- Begin function Sum_hszusumzupure_info$def + .globl SumSimpleBasic_hszusumzupure_info$def # -- Begin function SumSimpleBasic_hszusumzupure_info$def .p2align 4, 0x90 - .type Sum_hszusumzupure_info$def,@function - .quad (S3kT_srt-Sum_hszusumzupure_info$def)+24 # @"Sum_hszusumzupure_info$def" + .type SumSimpleBasic_hszusumzupure_info$def,@function + .quad (S3rl_srt-SumSimpleBasic_hszusumzupure_info$def)+24 # @"SumSimpleBasic_hszusumzupure_info$def" .quad 4294967299 # 0x100000003 .quad 0 # 0x0 .quad 4294967310 # 0x10000000e -Sum_hszusumzupure_info$def: -# BB#0: # %c3l6 - jmp Sum_hszusumzupure1_info$def # TAILCALL -.Lfunc_end5: - .size Sum_hszusumzupure_info$def, .Lfunc_end5-Sum_hszusumzupure_info$def +SumSimpleBasic_hszusumzupure_info$def: +# BB#0: # %c3ry + jmp SumSimpleBasic_hszusumzupure1_info$def # TAILCALL +.Lfunc_end11: + .size SumSimpleBasic_hszusumzupure_info$def, .Lfunc_end11-SumSimpleBasic_hszusumzupure_info$def # -- End function - .type Sum_zdtrModule4_bytes$def,@object # @"Sum_zdtrModule4_bytes$def" - .section .rodata,"a",@progbits -Sum_zdtrModule4_bytes$def: - .asciz "main" - .size Sum_zdtrModule4_bytes$def, 5 - - .type Sum_zdtrModule3_closure$def,@object # @"Sum_zdtrModule3_closure$def" - .data - .p2align 3 -Sum_zdtrModule3_closure$def: - .quad ghczmprim_GHCziTypes_TrNameS_con_info - .quad Sum_zdtrModule4_bytes$def - .size Sum_zdtrModule3_closure$def, 16 - - .type Sum_zdtrModule2_bytes$def,@object # @"Sum_zdtrModule2_bytes$def" - .section .rodata,"a",@progbits -Sum_zdtrModule2_bytes$def: - .asciz "Sum" - .size Sum_zdtrModule2_bytes$def, 4 - - .type Sum_zdtrModule1_closure$def,@object # @"Sum_zdtrModule1_closure$def" - .data - .p2align 3 -Sum_zdtrModule1_closure$def: - .quad ghczmprim_GHCziTypes_TrNameS_con_info - .quad Sum_zdtrModule2_bytes$def - .size Sum_zdtrModule1_closure$def, 16 - - .type Sum_zdtrModule_closure$def,@object # @"Sum_zdtrModule_closure$def" - .p2align 4 -Sum_zdtrModule_closure$def: - .quad ghczmprim_GHCziTypes_Module_con_info - .quad Sum_zdtrModule3_closure$def+1 - .quad Sum_zdtrModule1_closure$def+1 + .p2align 4, 0x90 # -- Begin function SumSimpleBasic_Cons_info$def + .type SumSimpleBasic_Cons_info$def,@function + .quad 8589934607 # @"SumSimpleBasic_Cons_info$def" + # 0x20000000f + .quad 0 # 0x0 + .quad 14 # 0xe +SumSimpleBasic_Cons_info$def: +# BB#0: # %c3rH + movq %rbx, -8(%rsp) + movq %rsi, -16(%rsp) + movq %r14, -24(%rsp) + addq $24, %r12 + movq %r12, -32(%rsp) + cmpq 856(%r13), %r12 + jbe .LBB12_1 +# BB#2: # %c3rL + movq $24, 904(%r13) + movq -16(%rsp), %rsi + movq -24(%rsp), %r14 + movq $SumSimpleBasic_Cons_closure$def, -8(%rsp) + movq -8(%r13), %rax + movq -32(%rsp), %r12 + movl $SumSimpleBasic_Cons_closure$def, %ebx + jmpq *%rax # TAILCALL +.LBB12_1: # %c3rK + movq -32(%rsp), %rax + movq $SumSimpleBasic_Cons_con_info, -16(%rax) + movq -24(%rsp), %rax + movq -32(%rsp), %rcx + movq %rax, -8(%rcx) + movq -16(%rsp), %rax + movq -32(%rsp), %rcx + movq %rax, (%rcx) + movq -32(%rsp), %r12 + leaq -14(%r12), %rbx + movq %rbx, -8(%rsp) + movq (%rbp), %rax + jmpq *%rax # TAILCALL +.Lfunc_end12: + .size SumSimpleBasic_Cons_info$def, .Lfunc_end12-SumSimpleBasic_Cons_info$def + # -- End function + .globl SumSimpleBasic_Nil_con_info$def # -- Begin function SumSimpleBasic_Nil_con_info$def + .p2align 4, 0x90 + .type SumSimpleBasic_Nil_con_info$def,@function + .quad i3st_str$def-SumSimpleBasic_Nil_con_info$def # @"SumSimpleBasic_Nil_con_info$def" + .quad 4294967296 # 0x100000000 .quad 3 # 0x3 - .size Sum_zdtrModule_closure$def, 32 - - .type Sum_zdwsum_closure$def,@object # @"Sum_zdwsum_closure$def" - .p2align 3 -Sum_zdwsum_closure$def: - .quad Sum_zdwsum_info$def - .size Sum_zdwsum_closure$def, 8 - - .type Sum_hszusumzupure2_closure$def,@object # @"Sum_hszusumzupure2_closure$def" - .p2align 4 -Sum_hszusumzupure2_closure$def: - .quad Sum_hszusumzupure2_info$def - .quad 0 # 0x0 - .quad 0 # 0x0 - .quad 0 # 0x0 - .size Sum_hszusumzupure2_closure$def, 32 - - .type Sum_hszusumzupure1_closure$def,@object # @"Sum_hszusumzupure1_closure$def" - .p2align 3 -Sum_hszusumzupure1_closure$def: - .quad Sum_hszusumzupure1_info$def - .quad 0 # 0x0 - .size Sum_hszusumzupure1_closure$def, 16 - - .type Sum_hszusumzupure_closure$def,@object # @"Sum_hszusumzupure_closure$def" - .p2align 3 -Sum_hszusumzupure_closure$def: - .quad Sum_hszusumzupure_info$def - .quad 0 # 0x0 - .size Sum_hszusumzupure_closure$def, 16 - - .type S3kT_srt$def,@object # @"S3kT_srt$def" +SumSimpleBasic_Nil_con_info$def: +# BB#0: # %c3ss + incq %rbx + movq %rbx, -8(%rsp) + movq (%rbp), %rax + jmpq *%rax # TAILCALL +.Lfunc_end13: + .size SumSimpleBasic_Nil_con_info$def, .Lfunc_end13-SumSimpleBasic_Nil_con_info$def + # -- End function + .globl SumSimpleBasic_Cons_con_info$def # -- Begin function SumSimpleBasic_Cons_con_info$def + .p2align 4, 0x90 + .type SumSimpleBasic_Cons_con_info$def,@function + .quad i3sD_str$def-SumSimpleBasic_Cons_con_info$def # @"SumSimpleBasic_Cons_con_info$def" + .quad 2 # 0x2 + .quad 4294967300 # 0x100000004 +SumSimpleBasic_Cons_con_info$def: +# BB#0: # %c3sC + addq $2, %rbx + movq %rbx, -8(%rsp) + movq (%rbp), %rax + jmpq *%rax # TAILCALL +.Lfunc_end14: + .size SumSimpleBasic_Cons_con_info$def, .Lfunc_end14-SumSimpleBasic_Cons_con_info$def + # -- End function + .type SumSimpleBasic_zdtrModule4_bytes$def,@object # @"SumSimpleBasic_zdtrModule4_bytes$def" .section .rodata,"a",@progbits +SumSimpleBasic_zdtrModule4_bytes$def: + .asciz "main" + .size SumSimpleBasic_zdtrModule4_bytes$def, 5 + + .type SumSimpleBasic_zdtrModule3_closure$def,@object # @"SumSimpleBasic_zdtrModule3_closure$def" + .data + .p2align 3 +SumSimpleBasic_zdtrModule3_closure$def: + .quad ghczmprim_GHCziTypes_TrNameS_con_info + .quad SumSimpleBasic_zdtrModule4_bytes$def + .size SumSimpleBasic_zdtrModule3_closure$def, 16 + + .type SumSimpleBasic_zdtrModule2_bytes$def,@object # @"SumSimpleBasic_zdtrModule2_bytes$def" + .section .rodata,"a",@progbits +SumSimpleBasic_zdtrModule2_bytes$def: + .asciz "SumSimpleBasic" + .size SumSimpleBasic_zdtrModule2_bytes$def, 15 + + .type SumSimpleBasic_zdtrModule1_closure$def,@object # @"SumSimpleBasic_zdtrModule1_closure$def" + .data + .p2align 3 +SumSimpleBasic_zdtrModule1_closure$def: + .quad ghczmprim_GHCziTypes_TrNameS_con_info + .quad SumSimpleBasic_zdtrModule2_bytes$def + .size SumSimpleBasic_zdtrModule1_closure$def, 16 + + .type SumSimpleBasic_zdtrModule_closure$def,@object # @"SumSimpleBasic_zdtrModule_closure$def" .p2align 4 -S3kT_srt$def: +SumSimpleBasic_zdtrModule_closure$def: + .quad ghczmprim_GHCziTypes_Module_con_info + .quad SumSimpleBasic_zdtrModule3_closure$def+1 + .quad SumSimpleBasic_zdtrModule1_closure$def+1 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtrModule_closure$def, 32 + + .type r3k9_closure$def,@object # @"r3k9_closure$def" + .p2align 3 +r3k9_closure$def: + .quad ghczmprim_GHCziTypes_KindRepVar_con_info + .quad 0 # 0x0 + .size r3k9_closure$def, 16 + + .type SumSimpleBasic_zdtcList2_bytes$def,@object # @"SumSimpleBasic_zdtcList2_bytes$def" + .section .rodata,"a",@progbits +SumSimpleBasic_zdtcList2_bytes$def: + .asciz "List" + .size SumSimpleBasic_zdtcList2_bytes$def, 5 + + .type SumSimpleBasic_zdtcList1_closure$def,@object # @"SumSimpleBasic_zdtcList1_closure$def" + .data + .p2align 3 +SumSimpleBasic_zdtcList1_closure$def: + .quad ghczmprim_GHCziTypes_TrNameS_con_info + .quad SumSimpleBasic_zdtcList2_bytes$def + .size SumSimpleBasic_zdtcList1_closure$def, 16 + + .type SumSimpleBasic_zdtcList_closure$def,@object # @"SumSimpleBasic_zdtcList_closure$def" + .p2align 4 +SumSimpleBasic_zdtcList_closure$def: + .quad ghczmprim_GHCziTypes_TyCon_con_info + .quad SumSimpleBasic_zdtrModule_closure$def+1 + .quad SumSimpleBasic_zdtcList1_closure$def+1 + .quad ghczmprim_GHCziTypes_krepzdztArrzt_closure + .quad 8125128733883036046 # 0x70c24188e16af18e + .quad 8522174167308563467 # 0x7644d840b46ff40b + .quad 0 # 0x0 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtcList_closure$def, 64 + + .type r3ka_closure$def,@object # @"r3ka_closure$def" + .p2align 4 +r3ka_closure$def: + .quad ghczmprim_GHCziTypes_ZC_con_info + .quad r3k9_closure$def+2 + .quad ghczmprim_GHCziTypes_ZMZN_closure+1 + .quad 3 # 0x3 + .size r3ka_closure$def, 32 + + .type SumSimpleBasic_zdtczqNil1_closure$def,@object # @"SumSimpleBasic_zdtczqNil1_closure$def" + .p2align 4 +SumSimpleBasic_zdtczqNil1_closure$def: + .quad ghczmprim_GHCziTypes_KindRepTyConApp_con_info + .quad SumSimpleBasic_zdtcList_closure$def+1 + .quad r3ka_closure$def+2 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtczqNil1_closure$def, 32 + + .type SumSimpleBasic_zdtczqNil3_bytes$def,@object # @"SumSimpleBasic_zdtczqNil3_bytes$def" + .section .rodata,"a",@progbits +SumSimpleBasic_zdtczqNil3_bytes$def: + .asciz "'Nil" + .size SumSimpleBasic_zdtczqNil3_bytes$def, 5 + + .type SumSimpleBasic_zdtczqNil2_closure$def,@object # @"SumSimpleBasic_zdtczqNil2_closure$def" + .data + .p2align 3 +SumSimpleBasic_zdtczqNil2_closure$def: + .quad ghczmprim_GHCziTypes_TrNameS_con_info + .quad SumSimpleBasic_zdtczqNil3_bytes$def + .size SumSimpleBasic_zdtczqNil2_closure$def, 16 + + .type SumSimpleBasic_zdtczqNil_closure$def,@object # @"SumSimpleBasic_zdtczqNil_closure$def" + .p2align 4 +SumSimpleBasic_zdtczqNil_closure$def: + .quad ghczmprim_GHCziTypes_TyCon_con_info + .quad SumSimpleBasic_zdtrModule_closure$def+1 + .quad SumSimpleBasic_zdtczqNil2_closure$def+1 + .quad SumSimpleBasic_zdtczqNil1_closure$def+1 + .quad 3225848470370281545 # 0x2cc48417afa86849 + .quad 8987752080532592311 # 0x7cbae8e5e96c56b7 + .quad 1 # 0x1 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtczqNil_closure$def, 64 + + .type r3kb_closure$def,@object # @"r3kb_closure$def" + .p2align 4 +r3kb_closure$def: + .quad ghczmprim_GHCziTypes_KindRepFun_con_info + .quad SumSimpleBasic_zdtczqNil1_closure$def+1 + .quad SumSimpleBasic_zdtczqNil1_closure$def+1 + .quad 3 # 0x3 + .size r3kb_closure$def, 32 + + .type SumSimpleBasic_zdtczqCons1_closure$def,@object # @"SumSimpleBasic_zdtczqCons1_closure$def" + .p2align 4 +SumSimpleBasic_zdtczqCons1_closure$def: + .quad ghczmprim_GHCziTypes_KindRepFun_con_info + .quad r3k9_closure$def+2 + .quad r3kb_closure$def+4 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtczqCons1_closure$def, 32 + + .type SumSimpleBasic_zdtczqCons3_bytes$def,@object # @"SumSimpleBasic_zdtczqCons3_bytes$def" + .section .rodata,"a",@progbits +SumSimpleBasic_zdtczqCons3_bytes$def: + .asciz "'Cons" + .size SumSimpleBasic_zdtczqCons3_bytes$def, 6 + + .type SumSimpleBasic_zdtczqCons2_closure$def,@object # @"SumSimpleBasic_zdtczqCons2_closure$def" + .data + .p2align 3 +SumSimpleBasic_zdtczqCons2_closure$def: + .quad ghczmprim_GHCziTypes_TrNameS_con_info + .quad SumSimpleBasic_zdtczqCons3_bytes$def + .size SumSimpleBasic_zdtczqCons2_closure$def, 16 + + .type SumSimpleBasic_zdtczqCons_closure$def,@object # @"SumSimpleBasic_zdtczqCons_closure$def" + .p2align 4 +SumSimpleBasic_zdtczqCons_closure$def: + .quad ghczmprim_GHCziTypes_TyCon_con_info + .quad SumSimpleBasic_zdtrModule_closure$def+1 + .quad SumSimpleBasic_zdtczqCons2_closure$def+1 + .quad SumSimpleBasic_zdtczqCons1_closure$def+4 + .quad -7205385302398664762 # 0x9c01543e44b4ffc6 + .quad 6836440343659544598 # 0x5edfea4583fa0016 + .quad 1 # 0x1 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtczqCons_closure$def, 64 + + .type SumSimpleBasic_zdwsum_closure$def,@object # @"SumSimpleBasic_zdwsum_closure$def" + .p2align 3 +SumSimpleBasic_zdwsum_closure$def: + .quad SumSimpleBasic_zdwsum_info$def + .size SumSimpleBasic_zdwsum_closure$def, 8 + + .type SumSimpleBasic_zdwupto_closure$def,@object # @"SumSimpleBasic_zdwupto_closure$def" + .p2align 3 +SumSimpleBasic_zdwupto_closure$def: + .quad SumSimpleBasic_zdwupto_info$def + .size SumSimpleBasic_zdwupto_closure$def, 8 + + .type SumSimpleBasic_hszusumzupure2_closure$def,@object # @"SumSimpleBasic_hszusumzupure2_closure$def" + .p2align 4 +SumSimpleBasic_hszusumzupure2_closure$def: + .quad SumSimpleBasic_hszusumzupure2_info$def + .quad 0 # 0x0 + .quad 0 # 0x0 + .quad 0 # 0x0 + .size SumSimpleBasic_hszusumzupure2_closure$def, 32 + + .type SumSimpleBasic_hszusumzupure1_closure$def,@object # @"SumSimpleBasic_hszusumzupure1_closure$def" + .p2align 3 +SumSimpleBasic_hszusumzupure1_closure$def: + .quad SumSimpleBasic_hszusumzupure1_info$def + .quad 0 # 0x0 + .size SumSimpleBasic_hszusumzupure1_closure$def, 16 + + .type SumSimpleBasic_hszusumzupure_closure$def,@object # @"SumSimpleBasic_hszusumzupure_closure$def" + .p2align 3 +SumSimpleBasic_hszusumzupure_closure$def: + .quad SumSimpleBasic_hszusumzupure_info$def + .quad 0 # 0x0 + .size SumSimpleBasic_hszusumzupure_closure$def, 16 + + .type SumSimpleBasic_Nil_closure$def,@object # @"SumSimpleBasic_Nil_closure$def" + .p2align 3 +SumSimpleBasic_Nil_closure$def: + .quad SumSimpleBasic_Nil_con_info + .size SumSimpleBasic_Nil_closure$def, 8 + + .type SumSimpleBasic_Cons_closure$def,@object # @"SumSimpleBasic_Cons_closure$def" + .p2align 3 +SumSimpleBasic_Cons_closure$def: + .quad SumSimpleBasic_Cons_info$def + .size SumSimpleBasic_Cons_closure$def, 8 + + .type i3st_str$def,@object # @"i3st_str$def" + .section .rodata,"a",@progbits +i3st_str$def: + .asciz "main:SumSimpleBasic.Nil" + .size i3st_str$def, 24 + + .type i3sD_str$def,@object # @"i3sD_str$def" +i3sD_str$def: + .asciz "main:SumSimpleBasic.Cons" + .size i3sD_str$def, 25 + + .type S3rl_srt$def,@object # @"S3rl_srt$def" + .p2align 4 +S3rl_srt$def: .quad base_GHCziIOziHandleziFD_stdout_closure .quad base_GHCziIOziHandleziText_hPutStr2_closure - .quad Sum_hszusumzupure2_closure$def - .quad Sum_hszusumzupure1_closure$def - .size S3kT_srt$def, 32 + .quad SumSimpleBasic_hszusumzupure2_closure$def + .quad SumSimpleBasic_hszusumzupure1_closure$def + .size S3rl_srt$def, 32 - .globl Sum_zdtrModule4_bytes -Sum_zdtrModule4_bytes = Sum_zdtrModule4_bytes$def - .globl Sum_zdtrModule3_closure -Sum_zdtrModule3_closure = Sum_zdtrModule3_closure$def - .globl Sum_zdtrModule2_bytes -Sum_zdtrModule2_bytes = Sum_zdtrModule2_bytes$def - .globl Sum_zdtrModule1_closure -Sum_zdtrModule1_closure = Sum_zdtrModule1_closure$def - .globl Sum_zdtrModule_closure -Sum_zdtrModule_closure = Sum_zdtrModule_closure$def - .globl Sum_zdwsum_closure -Sum_zdwsum_closure = Sum_zdwsum_closure$def - .globl Sum_zdwsum_info -Sum_zdwsum_info = Sum_zdwsum_info$def - .globl Sum_hszusumzupure2_closure -Sum_hszusumzupure2_closure = Sum_hszusumzupure2_closure$def - .globl Sum_hszusumzupure2_info -Sum_hszusumzupure2_info = Sum_hszusumzupure2_info$def -c3iW_info = c3iW_info$def -c3j1_info = c3j1_info$def - .globl Sum_hszusumzupure1_closure -Sum_hszusumzupure1_closure = Sum_hszusumzupure1_closure$def - .globl Sum_hszusumzupure1_info -Sum_hszusumzupure1_info = Sum_hszusumzupure1_info$def - .globl Sum_hszusumzupure_closure -Sum_hszusumzupure_closure = Sum_hszusumzupure_closure$def - .globl Sum_hszusumzupure_info -Sum_hszusumzupure_info = Sum_hszusumzupure_info$def -S3kT_srt = S3kT_srt$def + .globl SumSimpleBasic_zdtrModule4_bytes +SumSimpleBasic_zdtrModule4_bytes = SumSimpleBasic_zdtrModule4_bytes$def + .globl SumSimpleBasic_zdtrModule3_closure +SumSimpleBasic_zdtrModule3_closure = SumSimpleBasic_zdtrModule3_closure$def + .globl SumSimpleBasic_zdtrModule2_bytes +SumSimpleBasic_zdtrModule2_bytes = SumSimpleBasic_zdtrModule2_bytes$def + .globl SumSimpleBasic_zdtrModule1_closure +SumSimpleBasic_zdtrModule1_closure = SumSimpleBasic_zdtrModule1_closure$def + .globl SumSimpleBasic_zdtrModule_closure +SumSimpleBasic_zdtrModule_closure = SumSimpleBasic_zdtrModule_closure$def +r3k9_closure = r3k9_closure$def + .globl SumSimpleBasic_zdtcList2_bytes +SumSimpleBasic_zdtcList2_bytes = SumSimpleBasic_zdtcList2_bytes$def + .globl SumSimpleBasic_zdtcList1_closure +SumSimpleBasic_zdtcList1_closure = SumSimpleBasic_zdtcList1_closure$def + .globl SumSimpleBasic_zdtcList_closure +SumSimpleBasic_zdtcList_closure = SumSimpleBasic_zdtcList_closure$def +r3ka_closure = r3ka_closure$def + .globl SumSimpleBasic_zdtczqNil1_closure +SumSimpleBasic_zdtczqNil1_closure = SumSimpleBasic_zdtczqNil1_closure$def + .globl SumSimpleBasic_zdtczqNil3_bytes +SumSimpleBasic_zdtczqNil3_bytes = SumSimpleBasic_zdtczqNil3_bytes$def + .globl SumSimpleBasic_zdtczqNil2_closure +SumSimpleBasic_zdtczqNil2_closure = SumSimpleBasic_zdtczqNil2_closure$def + .globl SumSimpleBasic_zdtczqNil_closure +SumSimpleBasic_zdtczqNil_closure = SumSimpleBasic_zdtczqNil_closure$def +r3kb_closure = r3kb_closure$def + .globl SumSimpleBasic_zdtczqCons1_closure +SumSimpleBasic_zdtczqCons1_closure = SumSimpleBasic_zdtczqCons1_closure$def + .globl SumSimpleBasic_zdtczqCons3_bytes +SumSimpleBasic_zdtczqCons3_bytes = SumSimpleBasic_zdtczqCons3_bytes$def + .globl SumSimpleBasic_zdtczqCons2_closure +SumSimpleBasic_zdtczqCons2_closure = SumSimpleBasic_zdtczqCons2_closure$def + .globl SumSimpleBasic_zdtczqCons_closure +SumSimpleBasic_zdtczqCons_closure = SumSimpleBasic_zdtczqCons_closure$def + .globl SumSimpleBasic_zdwsum_closure +SumSimpleBasic_zdwsum_closure = SumSimpleBasic_zdwsum_closure$def + .globl SumSimpleBasic_zdwsum_info +SumSimpleBasic_zdwsum_info = SumSimpleBasic_zdwsum_info$def +c3kz_info = c3kz_info$def +c3kO_info = c3kO_info$def +c3kT_info = c3kT_info$def + .globl SumSimpleBasic_zdwupto_closure +SumSimpleBasic_zdwupto_closure = SumSimpleBasic_zdwupto_closure$def +s3kp_info = s3kp_info$def + .globl SumSimpleBasic_zdwupto_info +SumSimpleBasic_zdwupto_info = SumSimpleBasic_zdwupto_info$def + .globl SumSimpleBasic_hszusumzupure2_closure +SumSimpleBasic_hszusumzupure2_closure = SumSimpleBasic_hszusumzupure2_closure$def + .globl SumSimpleBasic_hszusumzupure2_info +SumSimpleBasic_hszusumzupure2_info = SumSimpleBasic_hszusumzupure2_info$def +c3ph_info = c3ph_info$def +c3pm_info = c3pm_info$def +c3pq_info = c3pq_info$def + .globl SumSimpleBasic_hszusumzupure1_closure +SumSimpleBasic_hszusumzupure1_closure = SumSimpleBasic_hszusumzupure1_closure$def + .globl SumSimpleBasic_hszusumzupure1_info +SumSimpleBasic_hszusumzupure1_info = SumSimpleBasic_hszusumzupure1_info$def + .globl SumSimpleBasic_hszusumzupure_closure +SumSimpleBasic_hszusumzupure_closure = SumSimpleBasic_hszusumzupure_closure$def + .globl SumSimpleBasic_hszusumzupure_info +SumSimpleBasic_hszusumzupure_info = SumSimpleBasic_hszusumzupure_info$def + .globl SumSimpleBasic_Nil_closure +SumSimpleBasic_Nil_closure = SumSimpleBasic_Nil_closure$def + .globl SumSimpleBasic_Cons_closure +SumSimpleBasic_Cons_closure = SumSimpleBasic_Cons_closure$def +SumSimpleBasic_Cons_info = SumSimpleBasic_Cons_info$def +i3st_str = i3st_str$def + .globl SumSimpleBasic_Nil_con_info +SumSimpleBasic_Nil_con_info = SumSimpleBasic_Nil_con_info$def +i3sD_str = i3sD_str$def + .globl SumSimpleBasic_Cons_con_info +SumSimpleBasic_Cons_con_info = SumSimpleBasic_Cons_con_info$def +S3rl_srt = S3rl_srt$def .section ".note.GNU-stack","",@progbits diff --git a/playground/sum/sum-ghc-8.4.1-llvm-O3.s b/playground/sum/sum-ghc-8.4.1-llvm-O3.s index a68e63ac..ae58b22b 100644 --- a/playground/sum/sum-ghc-8.4.1-llvm-O3.s +++ b/playground/sum/sum-ghc-8.4.1-llvm-O3.s @@ -1,86 +1,347 @@ .text - .file "sum.ll" - .globl Sum_zdwsum_info$def # -- Begin function Sum_zdwsum_info$def + .file "SumSimpleBasic.ll" + .globl SumSimpleBasic_zdwsum_info$def # -- Begin function SumSimpleBasic_zdwsum_info$def .p2align 4, 0x90 - .type Sum_zdwsum_info$def,@function - .quad 12884901904 # @"Sum_zdwsum_info$def" - # 0x300000010 + .type SumSimpleBasic_zdwsum_info$def,@function + .quad 4294967301 # @"SumSimpleBasic_zdwsum_info$def" + # 0x100000005 .quad 0 # 0x0 .quad 14 # 0xe -Sum_zdwsum_info$def: -# BB#0: # %c3is - cmpq %rdi, %rsi - jg .LBB0_3 +SumSimpleBasic_zdwsum_info$def: +# BB#0: # %c3kG + movq %rbp, %rax + leaq -16(%rax), %rbp + cmpq %r15, %rbp + jb .LBB0_7 .p2align 4, 0x90 -.LBB0_1: # %c3iq +.LBB0_1: # %c3kI # =>This Inner Loop Header: Depth=1 - addq %rsi, %r14 - incq %rsi - cmpq %rdi, %rsi - jle .LBB0_1 -.LBB0_3: # %c3ir - movq (%rbp), %rax + movq $c3kz_info$def, 8(%rbp) + movl %r14d, %eax + andb $7, %al + cmpb $2, %al + jne .LBB0_2 +# BB#4: # %c3kE.i + # in Loop: Header=BB0_1 Depth=1 + movq $c3kO_info$def, (%rbp) + movq 6(%r14), %rbx + movq 14(%r14), %r14 + movq %r14, 8(%rbp) + testb $7, %bl + je .LBB0_9 +# BB#5: # %u3l1.i + # in Loop: Header=BB0_1 Depth=1 + movq $c3kT_info$def, (%rbp) + movq 7(%rbx), %rax + movq %rax, 8(%rbp) + addq $-16, %rbp + cmpq %r15, %rbp + jae .LBB0_1 +# BB#6: # %c3kH.loopexit + addq $16, %rbp + movq %rbp, %rax +.LBB0_7: # %c3kH + movq -8(%r13), %rcx + movl $SumSimpleBasic_zdwsum_closure, %ebx + movq %rax, %rbp + jmpq *%rcx # TAILCALL +.LBB0_2: # %c3kI + testb %al, %al + jne .LBB0_3 +# BB#8: # %c3kA + movq (%r14), %rax + addq $8, %rbp movq %r14, %rbx jmpq *%rax # TAILCALL +.LBB0_9: # %c3kP.i + movq (%rbx), %rax + jmpq *%rax # TAILCALL +.LBB0_3: # %c3kD.i + movq 16(%rbp), %rax + addq $16, %rbp + xorl %ebx, %ebx + jmpq *%rax # TAILCALL .Lfunc_end0: - .size Sum_zdwsum_info$def, .Lfunc_end0-Sum_zdwsum_info$def + .size SumSimpleBasic_zdwsum_info$def, .Lfunc_end0-SumSimpleBasic_zdwsum_info$def # -- End function - .globl Sum_hszusumzupure2_info$def # -- Begin function Sum_hszusumzupure2_info$def + .p2align 4, 0x90 # -- Begin function c3kz_info$def + .type c3kz_info$def,@function + .quad 0 # @"c3kz_info$def" + # 0x0 + .quad 30 # 0x1e +c3kz_info$def: +# BB#0: # %c3kz + movl %ebx, %eax + andl $7, %eax + cmpq $2, %rax + jne .LBB1_3 +# BB#1: # %c3kE + leaq -8(%rbp), %rax + movq $c3kO_info$def, -8(%rbp) + movq 6(%rbx), %rcx + movq 14(%rbx), %r14 + movq %r14, (%rbp) + testb $7, %cl + je .LBB1_4 +# BB#2: # %u3l1 + movq $c3kT_info$def, -8(%rbp) + movq 7(%rcx), %rcx + movq %rcx, (%rbp) + movq %rax, %rbp + jmp SumSimpleBasic_zdwsum_info$def # TAILCALL +.LBB1_3: # %c3kD + movq 8(%rbp), %rax + addq $8, %rbp + xorl %ebx, %ebx + jmpq *%rax # TAILCALL +.LBB1_4: # %c3kP + movq (%rcx), %rdx + movq %rax, %rbp + movq %rcx, %rbx + jmpq *%rdx # TAILCALL +.Lfunc_end1: + .size c3kz_info$def, .Lfunc_end1-c3kz_info$def + # -- End function + .p2align 4, 0x90 # -- Begin function c3kO_info$def + .type c3kO_info$def,@function + .quad 1 # @"c3kO_info$def" + # 0x1 + .quad 30 # 0x1e +c3kO_info$def: +# BB#0: # %c3kO + movq $c3kT_info$def, (%rbp) + movq 8(%rbp), %r14 + movq 7(%rbx), %rax + movq %rax, 8(%rbp) + jmp SumSimpleBasic_zdwsum_info$def # TAILCALL +.Lfunc_end2: + .size c3kO_info$def, .Lfunc_end2-c3kO_info$def + # -- End function + .p2align 4, 0x90 # -- Begin function c3kT_info$def + .type c3kT_info$def,@function + .quad 65 # @"c3kT_info$def" + # 0x41 + .quad 30 # 0x1e +c3kT_info$def: +# BB#0: # %c3kT + addq 8(%rbp), %rbx + movq 16(%rbp), %rax + addq $16, %rbp + jmpq *%rax # TAILCALL +.Lfunc_end3: + .size c3kT_info$def, .Lfunc_end3-c3kT_info$def + # -- End function + .p2align 4, 0x90 # -- Begin function s3kp_info$def + .type s3kp_info$def,@function + .quad 8589934592 # @"s3kp_info$def" + # 0x200000000 + .quad 20 # 0x14 +s3kp_info$def: +# BB#0: # %c3n4 + movq %rbp, %rax + leaq -16(%rax), %rbp + cmpq %r15, %rbp + jb .LBB4_5 +# BB#1: # %c3n6 + movq $stg_upd_frame_info, -16(%rax) + movq %rbx, -8(%rax) + movq 16(%rbx), %r14 + movq 24(%rbx), %rsi + incq %r14 + leaq 72(%r12), %rax + cmpq %rax, 856(%r13) + jb .LBB4_4 +# BB#2: # %c3nd.i + cmpq %rsi, %r14 + jle .LBB4_6 +# BB#3: # %c3n9.i + movl $SumSimpleBasic_Nil_closure+1, %ebx + jmp stg_upd_frame_info # TAILCALL +.LBB4_6: # %c3n8.i + leaq 8(%r12), %rcx + movq $s3kp_info$def, 8(%r12) + movq %r14, 24(%r12) + movq %rsi, 32(%r12) + movq $ghczmprim_GHCziTypes_Izh_con_info, 40(%r12) + movq %r14, 48(%r12) + movq $SumSimpleBasic_Cons_con_info$def, 56(%r12) + leaq -31(%rax), %rdx + movq %rdx, 64(%r12) + movq %rcx, 72(%r12) + leaq -14(%rax), %rbx + movq %rax, %r12 + jmp stg_upd_frame_info # TAILCALL +.LBB4_5: # %c3n5 + movq -16(%r13), %rcx + movq %rax, %rbp + jmpq *%rcx # TAILCALL +.LBB4_4: # %c3ne.i + movq $72, 904(%r13) + movq -8(%r13), %rcx + movl $SumSimpleBasic_zdwupto_closure, %ebx + movq %rax, %r12 + jmpq *%rcx # TAILCALL +.Lfunc_end4: + .size s3kp_info$def, .Lfunc_end4-s3kp_info$def + # -- End function + .globl SumSimpleBasic_zdwupto_info$def # -- Begin function SumSimpleBasic_zdwupto_info$def .p2align 4, 0x90 - .type Sum_hszusumzupure2_info$def,@function - .quad 0 # @"Sum_hszusumzupure2_info$def" + .type SumSimpleBasic_zdwupto_info$def,@function + .quad 8589934604 # @"SumSimpleBasic_zdwupto_info$def" + # 0x20000000c + .quad 0 # 0x0 + .quad 14 # 0xe +SumSimpleBasic_zdwupto_info$def: +# BB#0: # %c3na + movq %r12, %rax + leaq 72(%rax), %r12 + cmpq %r12, 856(%r13) + jb .LBB5_3 +# BB#1: # %c3nd + cmpq %rsi, %r14 + jle .LBB5_4 +# BB#2: # %c3n9 + movq (%rbp), %rcx + movl $SumSimpleBasic_Nil_closure+1, %ebx + movq %rax, %r12 + jmpq *%rcx # TAILCALL +.LBB5_4: # %c3n8 + leaq 8(%rax), %rcx + movq $s3kp_info$def, 8(%rax) + movq %r14, 24(%rax) + movq %rsi, 32(%rax) + movq $ghczmprim_GHCziTypes_Izh_con_info, 40(%rax) + movq %r14, 48(%rax) + movq $SumSimpleBasic_Cons_con_info$def, 56(%rax) + leaq -31(%r12), %rdx + movq %rdx, 64(%rax) + movq %rcx, 72(%rax) + movq (%rbp), %rax + leaq -14(%r12), %rbx + jmpq *%rax # TAILCALL +.LBB5_3: # %c3ne + movq $72, 904(%r13) + movq -8(%r13), %rax + movl $SumSimpleBasic_zdwupto_closure, %ebx + jmpq *%rax # TAILCALL +.Lfunc_end5: + .size SumSimpleBasic_zdwupto_info$def, .Lfunc_end5-SumSimpleBasic_zdwupto_info$def + # -- End function + .section .rodata.cst16,"aM",@progbits,16 + .p2align 4 # -- Begin function SumSimpleBasic_hszusumzupure2_info$def +.LCPI6_0: + .quad 1 # 0x1 + .quad 100000 # 0x186a0 + .text + .globl SumSimpleBasic_hszusumzupure2_info$def + .p2align 4, 0x90 + .type SumSimpleBasic_hszusumzupure2_info$def,@function + .quad 0 # @"SumSimpleBasic_hszusumzupure2_info$def" # 0x0 .quad 21 # 0x15 -Sum_hszusumzupure2_info$def: -# BB#0: # %c3iY +SumSimpleBasic_hszusumzupure2_info$def: +# BB#0: # %c3pj movq %rbp, %r14 leaq -24(%r14), %rbp cmpq %r15, %rbp - jb .LBB1_3 -# BB#1: # %c3j5 + jb .LBB6_5 +# BB#1: # %c3pu pushq %rax movq %r13, %rdi movq %rbx, %rsi callq newCAF testq %rax, %rax leaq 8(%rsp), %rsp - je .LBB1_2 -# BB#4: # %c3iU + je .LBB6_4 +# BB#2: # %c3pf movq %rax, -8(%r14) movl $stg_bh_upd_frame_info, %eax movq %rax, %xmm0 - movl $c3j1_info$def, %eax + movl $c3ph_info$def, %eax movq %rax, %xmm1 punpcklqdq %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0] movdqu %xmm1, -24(%r14) - movabsq $5000050000, %rbx # imm = 0x12A06B550 + leaq 72(%r12), %rax + cmpq %rax, 856(%r13) + jb .LBB6_3 +# BB#6: # %c3nd.i + leaq 8(%r12), %rcx + movq $s3kp_info$def, 8(%r12) + movaps .LCPI6_0(%rip), %xmm0 # xmm0 = [1,100000] + movups %xmm0, 24(%r12) + movl $1, %edx + movq %rdx, %xmm0 + movl $ghczmprim_GHCziTypes_Izh_con_info, %edx + movq %rdx, %xmm1 + punpcklqdq %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0] + movdqu %xmm1, 40(%r12) + movq $SumSimpleBasic_Cons_con_info$def, 56(%r12) + leaq -31(%rax), %rdx + movq %rdx, 64(%r12) + movq %rcx, 72(%r12) + movq $c3pm_info$def, (%rbp) + leaq -14(%rax), %r14 + movq %rax, %r12 + jmp SumSimpleBasic_zdwsum_info$def # TAILCALL +.LBB6_4: # %c3pg + movq (%rbx), %rax + movq %r14, %rbp + jmpq *%rax # TAILCALL +.LBB6_5: # %c3pt + movq -16(%r13), %rax + movq %r14, %rbp + jmpq *%rax # TAILCALL +.LBB6_3: # %c3ne.i + movq $72, 904(%r13) + movq -8(%r13), %rcx + movl $SumSimpleBasic_zdwupto_closure, %ebx + movl $1, %r14d + movl $100000, %esi # imm = 0x186A0 + movq %rax, %r12 + jmpq *%rcx # TAILCALL +.Lfunc_end6: + .size SumSimpleBasic_hszusumzupure2_info$def, .Lfunc_end6-SumSimpleBasic_hszusumzupure2_info$def + # -- End function + .p2align 4, 0x90 # -- Begin function c3ph_info$def + .type c3ph_info$def,@function + .quad 0 # @"c3ph_info$def" + # 0x0 + .quad 30 # 0x1e +c3ph_info$def: +# BB#0: # %c3ph + movq $c3pm_info$def, (%rbp) + movq %rbx, %r14 + jmp SumSimpleBasic_zdwsum_info$def # TAILCALL +.Lfunc_end7: + .size c3ph_info$def, .Lfunc_end7-c3ph_info$def + # -- End function + .p2align 4, 0x90 # -- Begin function c3pm_info$def + .type c3pm_info$def,@function + .quad 0 # @"c3pm_info$def" + # 0x0 + .quad 30 # 0x1e +c3pm_info$def: +# BB#0: # %c3pm + movq $c3pq_info$def, (%rbp) xorl %r14d, %r14d movl $ghczmprim_GHCziTypes_ZMZN_closure+1, %edi movq %rbx, %rsi jmp base_GHCziShow_zdwshowSignedInt_info # TAILCALL -.LBB1_2: # %c3iV - movq (%rbx), %rax - movq %r14, %rbp - jmpq *%rax # TAILCALL -.LBB1_3: # %c3j4 - movq -16(%r13), %rax - movq %r14, %rbp - jmpq *%rax # TAILCALL -.Lfunc_end1: - .size Sum_hszusumzupure2_info$def, .Lfunc_end1-Sum_hszusumzupure2_info$def +.Lfunc_end8: + .size c3pm_info$def, .Lfunc_end8-c3pm_info$def # -- End function - .p2align 4, 0x90 # -- Begin function c3j1_info$def - .type c3j1_info$def,@function - .quad 0 # @"c3j1_info$def" + .p2align 4, 0x90 # -- Begin function c3pq_info$def + .type c3pq_info$def,@function + .quad 0 # @"c3pq_info$def" # 0x0 .quad 30 # 0x1e -c3j1_info$def: -# BB#0: # %c3j1 +c3pq_info$def: +# BB#0: # %c3pq movq %r12, %rax leaq 24(%rax), %r12 cmpq %r12, 856(%r13) - jb .LBB2_2 -# BB#1: # %c3j8 + jb .LBB9_2 +# BB#1: # %c3py movq $ghczmprim_GHCziTypes_ZC_con_info, 8(%rax) movq %rbx, 16(%rax) movq %r14, 24(%rax) @@ -88,136 +349,363 @@ c3j1_info$def: addq $8, %rbp leaq -14(%r12), %rbx jmpq *%rax # TAILCALL -.LBB2_2: # %c3j9 +.LBB9_2: # %c3pz movq $24, 904(%r13) jmp stg_gc_pp # TAILCALL -.Lfunc_end2: - .size c3j1_info$def, .Lfunc_end2-c3j1_info$def +.Lfunc_end9: + .size c3pq_info$def, .Lfunc_end9-c3pq_info$def # -- End function - .globl Sum_hszusumzupure1_info$def # -- Begin function Sum_hszusumzupure1_info$def + .globl SumSimpleBasic_hszusumzupure1_info$def # -- Begin function SumSimpleBasic_hszusumzupure1_info$def .p2align 4, 0x90 - .type Sum_hszusumzupure1_info$def,@function - .quad S3kT_srt$def-Sum_hszusumzupure1_info$def # @"Sum_hszusumzupure1_info$def" + .type SumSimpleBasic_hszusumzupure1_info$def,@function + .quad S3rl_srt$def-SumSimpleBasic_hszusumzupure1_info$def # @"SumSimpleBasic_hszusumzupure1_info$def" .quad 4294967299 # 0x100000003 .quad 0 # 0x0 .quad 30064771086 # 0x70000000e -Sum_hszusumzupure1_info$def: -# BB#0: # %c3kQ +SumSimpleBasic_hszusumzupure1_info$def: +# BB#0: # %c3ri movl $base_GHCziIOziHandleziFD_stdout_closure, %r14d - movl $Sum_hszusumzupure2_closure, %esi + movl $SumSimpleBasic_hszusumzupure2_closure, %esi movl $ghczmprim_GHCziTypes_True_closure+2, %edi jmp base_GHCziIOziHandleziText_hPutStr2_info # TAILCALL -.Lfunc_end3: - .size Sum_hszusumzupure1_info$def, .Lfunc_end3-Sum_hszusumzupure1_info$def +.Lfunc_end10: + .size SumSimpleBasic_hszusumzupure1_info$def, .Lfunc_end10-SumSimpleBasic_hszusumzupure1_info$def # -- End function - .globl Sum_hszusumzupure_info$def # -- Begin function Sum_hszusumzupure_info$def + .globl SumSimpleBasic_hszusumzupure_info$def # -- Begin function SumSimpleBasic_hszusumzupure_info$def .p2align 4, 0x90 - .type Sum_hszusumzupure_info$def,@function - .quad (S3kT_srt$def-Sum_hszusumzupure_info$def)+24 # @"Sum_hszusumzupure_info$def" + .type SumSimpleBasic_hszusumzupure_info$def,@function + .quad (S3rl_srt$def-SumSimpleBasic_hszusumzupure_info$def)+24 # @"SumSimpleBasic_hszusumzupure_info$def" .quad 4294967299 # 0x100000003 .quad 0 # 0x0 .quad 4294967310 # 0x10000000e -Sum_hszusumzupure_info$def: -# BB#0: # %c3l6 +SumSimpleBasic_hszusumzupure_info$def: +# BB#0: # %c3ry movl $base_GHCziIOziHandleziFD_stdout_closure, %r14d - movl $Sum_hszusumzupure2_closure, %esi + movl $SumSimpleBasic_hszusumzupure2_closure, %esi movl $ghczmprim_GHCziTypes_True_closure+2, %edi jmp base_GHCziIOziHandleziText_hPutStr2_info # TAILCALL -.Lfunc_end4: - .size Sum_hszusumzupure_info$def, .Lfunc_end4-Sum_hszusumzupure_info$def +.Lfunc_end11: + .size SumSimpleBasic_hszusumzupure_info$def, .Lfunc_end11-SumSimpleBasic_hszusumzupure_info$def # -- End function - .type Sum_zdtrModule4_bytes,@object # @Sum_zdtrModule4_bytes - .section .rodata,"a",@progbits - .globl Sum_zdtrModule4_bytes -Sum_zdtrModule4_bytes: - .asciz "main" - .size Sum_zdtrModule4_bytes, 5 - - .type Sum_zdtrModule3_closure,@object # @Sum_zdtrModule3_closure - .data - .globl Sum_zdtrModule3_closure - .p2align 3 -Sum_zdtrModule3_closure: - .quad ghczmprim_GHCziTypes_TrNameS_con_info - .quad Sum_zdtrModule4_bytes - .size Sum_zdtrModule3_closure, 16 - - .type Sum_zdtrModule2_bytes,@object # @Sum_zdtrModule2_bytes - .section .rodata,"a",@progbits - .globl Sum_zdtrModule2_bytes -Sum_zdtrModule2_bytes: - .asciz "Sum" - .size Sum_zdtrModule2_bytes, 4 - - .type Sum_zdtrModule1_closure,@object # @Sum_zdtrModule1_closure - .data - .globl Sum_zdtrModule1_closure - .p2align 3 -Sum_zdtrModule1_closure: - .quad ghczmprim_GHCziTypes_TrNameS_con_info - .quad Sum_zdtrModule2_bytes - .size Sum_zdtrModule1_closure, 16 - - .type Sum_zdtrModule_closure,@object # @Sum_zdtrModule_closure - .globl Sum_zdtrModule_closure - .p2align 4 -Sum_zdtrModule_closure: - .quad ghczmprim_GHCziTypes_Module_con_info - .quad Sum_zdtrModule3_closure+1 - .quad Sum_zdtrModule1_closure+1 + .p2align 4, 0x90 # -- Begin function SumSimpleBasic_Cons_info$def + .type SumSimpleBasic_Cons_info$def,@function + .quad 8589934607 # @"SumSimpleBasic_Cons_info$def" + # 0x20000000f + .quad 0 # 0x0 + .quad 14 # 0xe +SumSimpleBasic_Cons_info$def: +# BB#0: # %c3rH + movq %r12, %rax + leaq 24(%rax), %r12 + cmpq %r12, 856(%r13) + jb .LBB12_2 +# BB#1: # %c3rK + movq $SumSimpleBasic_Cons_con_info$def, 8(%rax) + movq %r14, 16(%rax) + movq %rsi, 24(%rax) + movq (%rbp), %rax + leaq -14(%r12), %rbx + jmpq *%rax # TAILCALL +.LBB12_2: # %c3rL + movq $24, 904(%r13) + movq -8(%r13), %rax + movl $SumSimpleBasic_Cons_closure, %ebx + jmpq *%rax # TAILCALL +.Lfunc_end12: + .size SumSimpleBasic_Cons_info$def, .Lfunc_end12-SumSimpleBasic_Cons_info$def + # -- End function + .globl SumSimpleBasic_Nil_con_info$def # -- Begin function SumSimpleBasic_Nil_con_info$def + .p2align 4, 0x90 + .type SumSimpleBasic_Nil_con_info$def,@function + .quad i3st_str$def-SumSimpleBasic_Nil_con_info$def # @"SumSimpleBasic_Nil_con_info$def" + .quad 4294967296 # 0x100000000 .quad 3 # 0x3 - .size Sum_zdtrModule_closure, 32 - - .type Sum_zdwsum_closure,@object # @Sum_zdwsum_closure - .globl Sum_zdwsum_closure - .p2align 3 -Sum_zdwsum_closure: - .quad Sum_zdwsum_info$def - .size Sum_zdwsum_closure, 8 - - .type Sum_hszusumzupure2_closure,@object # @Sum_hszusumzupure2_closure - .globl Sum_hszusumzupure2_closure - .p2align 4 -Sum_hszusumzupure2_closure: - .quad Sum_hszusumzupure2_info$def - .quad 0 # 0x0 - .quad 0 # 0x0 - .quad 0 # 0x0 - .size Sum_hszusumzupure2_closure, 32 - - .type Sum_hszusumzupure1_closure,@object # @Sum_hszusumzupure1_closure - .globl Sum_hszusumzupure1_closure - .p2align 3 -Sum_hszusumzupure1_closure: - .quad Sum_hszusumzupure1_info$def - .quad 0 # 0x0 - .size Sum_hszusumzupure1_closure, 16 - - .type Sum_hszusumzupure_closure,@object # @Sum_hszusumzupure_closure - .globl Sum_hszusumzupure_closure - .p2align 3 -Sum_hszusumzupure_closure: - .quad Sum_hszusumzupure_info$def - .quad 0 # 0x0 - .size Sum_hszusumzupure_closure, 16 - - .type S3kT_srt$def,@object # @"S3kT_srt$def" +SumSimpleBasic_Nil_con_info$def: +# BB#0: # %c3ss + incq %rbx + movq (%rbp), %rax + jmpq *%rax # TAILCALL +.Lfunc_end13: + .size SumSimpleBasic_Nil_con_info$def, .Lfunc_end13-SumSimpleBasic_Nil_con_info$def + # -- End function + .globl SumSimpleBasic_Cons_con_info$def # -- Begin function SumSimpleBasic_Cons_con_info$def + .p2align 4, 0x90 + .type SumSimpleBasic_Cons_con_info$def,@function + .quad i3sD_str$def-SumSimpleBasic_Cons_con_info$def # @"SumSimpleBasic_Cons_con_info$def" + .quad 2 # 0x2 + .quad 4294967300 # 0x100000004 +SumSimpleBasic_Cons_con_info$def: +# BB#0: # %c3sC + addq $2, %rbx + movq (%rbp), %rax + jmpq *%rax # TAILCALL +.Lfunc_end14: + .size SumSimpleBasic_Cons_con_info$def, .Lfunc_end14-SumSimpleBasic_Cons_con_info$def + # -- End function + .type SumSimpleBasic_zdtrModule4_bytes,@object # @SumSimpleBasic_zdtrModule4_bytes .section .rodata,"a",@progbits + .globl SumSimpleBasic_zdtrModule4_bytes +SumSimpleBasic_zdtrModule4_bytes: + .asciz "main" + .size SumSimpleBasic_zdtrModule4_bytes, 5 + + .type SumSimpleBasic_zdtrModule3_closure,@object # @SumSimpleBasic_zdtrModule3_closure + .data + .globl SumSimpleBasic_zdtrModule3_closure + .p2align 3 +SumSimpleBasic_zdtrModule3_closure: + .quad ghczmprim_GHCziTypes_TrNameS_con_info + .quad SumSimpleBasic_zdtrModule4_bytes + .size SumSimpleBasic_zdtrModule3_closure, 16 + + .type SumSimpleBasic_zdtrModule2_bytes,@object # @SumSimpleBasic_zdtrModule2_bytes + .section .rodata,"a",@progbits + .globl SumSimpleBasic_zdtrModule2_bytes +SumSimpleBasic_zdtrModule2_bytes: + .asciz "SumSimpleBasic" + .size SumSimpleBasic_zdtrModule2_bytes, 15 + + .type SumSimpleBasic_zdtrModule1_closure,@object # @SumSimpleBasic_zdtrModule1_closure + .data + .globl SumSimpleBasic_zdtrModule1_closure + .p2align 3 +SumSimpleBasic_zdtrModule1_closure: + .quad ghczmprim_GHCziTypes_TrNameS_con_info + .quad SumSimpleBasic_zdtrModule2_bytes + .size SumSimpleBasic_zdtrModule1_closure, 16 + + .type SumSimpleBasic_zdtrModule_closure,@object # @SumSimpleBasic_zdtrModule_closure + .globl SumSimpleBasic_zdtrModule_closure .p2align 4 -S3kT_srt$def: +SumSimpleBasic_zdtrModule_closure: + .quad ghczmprim_GHCziTypes_Module_con_info + .quad SumSimpleBasic_zdtrModule3_closure+1 + .quad SumSimpleBasic_zdtrModule1_closure+1 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtrModule_closure, 32 + + .type r3k9_closure$def,@object # @"r3k9_closure$def" + .p2align 3 +r3k9_closure$def: + .quad ghczmprim_GHCziTypes_KindRepVar_con_info + .quad 0 # 0x0 + .size r3k9_closure$def, 16 + + .type SumSimpleBasic_zdtcList2_bytes,@object # @SumSimpleBasic_zdtcList2_bytes + .section .rodata,"a",@progbits + .globl SumSimpleBasic_zdtcList2_bytes +SumSimpleBasic_zdtcList2_bytes: + .asciz "List" + .size SumSimpleBasic_zdtcList2_bytes, 5 + + .type SumSimpleBasic_zdtcList1_closure,@object # @SumSimpleBasic_zdtcList1_closure + .data + .globl SumSimpleBasic_zdtcList1_closure + .p2align 3 +SumSimpleBasic_zdtcList1_closure: + .quad ghczmprim_GHCziTypes_TrNameS_con_info + .quad SumSimpleBasic_zdtcList2_bytes + .size SumSimpleBasic_zdtcList1_closure, 16 + + .type SumSimpleBasic_zdtcList_closure,@object # @SumSimpleBasic_zdtcList_closure + .globl SumSimpleBasic_zdtcList_closure + .p2align 4 +SumSimpleBasic_zdtcList_closure: + .quad ghczmprim_GHCziTypes_TyCon_con_info + .quad SumSimpleBasic_zdtrModule_closure+1 + .quad SumSimpleBasic_zdtcList1_closure+1 + .quad ghczmprim_GHCziTypes_krepzdztArrzt_closure + .quad 8125128733883036046 # 0x70c24188e16af18e + .quad 8522174167308563467 # 0x7644d840b46ff40b + .quad 0 # 0x0 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtcList_closure, 64 + + .type r3ka_closure$def,@object # @"r3ka_closure$def" + .p2align 4 +r3ka_closure$def: + .quad ghczmprim_GHCziTypes_ZC_con_info + .quad r3k9_closure$def+2 + .quad ghczmprim_GHCziTypes_ZMZN_closure+1 + .quad 3 # 0x3 + .size r3ka_closure$def, 32 + + .type SumSimpleBasic_zdtczqNil1_closure,@object # @SumSimpleBasic_zdtczqNil1_closure + .globl SumSimpleBasic_zdtczqNil1_closure + .p2align 4 +SumSimpleBasic_zdtczqNil1_closure: + .quad ghczmprim_GHCziTypes_KindRepTyConApp_con_info + .quad SumSimpleBasic_zdtcList_closure+1 + .quad r3ka_closure$def+2 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtczqNil1_closure, 32 + + .type SumSimpleBasic_zdtczqNil3_bytes,@object # @SumSimpleBasic_zdtczqNil3_bytes + .section .rodata,"a",@progbits + .globl SumSimpleBasic_zdtczqNil3_bytes +SumSimpleBasic_zdtczqNil3_bytes: + .asciz "'Nil" + .size SumSimpleBasic_zdtczqNil3_bytes, 5 + + .type SumSimpleBasic_zdtczqNil2_closure,@object # @SumSimpleBasic_zdtczqNil2_closure + .data + .globl SumSimpleBasic_zdtczqNil2_closure + .p2align 3 +SumSimpleBasic_zdtczqNil2_closure: + .quad ghczmprim_GHCziTypes_TrNameS_con_info + .quad SumSimpleBasic_zdtczqNil3_bytes + .size SumSimpleBasic_zdtczqNil2_closure, 16 + + .type SumSimpleBasic_zdtczqNil_closure,@object # @SumSimpleBasic_zdtczqNil_closure + .globl SumSimpleBasic_zdtczqNil_closure + .p2align 4 +SumSimpleBasic_zdtczqNil_closure: + .quad ghczmprim_GHCziTypes_TyCon_con_info + .quad SumSimpleBasic_zdtrModule_closure+1 + .quad SumSimpleBasic_zdtczqNil2_closure+1 + .quad SumSimpleBasic_zdtczqNil1_closure+1 + .quad 3225848470370281545 # 0x2cc48417afa86849 + .quad 8987752080532592311 # 0x7cbae8e5e96c56b7 + .quad 1 # 0x1 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtczqNil_closure, 64 + + .type r3kb_closure$def,@object # @"r3kb_closure$def" + .p2align 4 +r3kb_closure$def: + .quad ghczmprim_GHCziTypes_KindRepFun_con_info + .quad SumSimpleBasic_zdtczqNil1_closure+1 + .quad SumSimpleBasic_zdtczqNil1_closure+1 + .quad 3 # 0x3 + .size r3kb_closure$def, 32 + + .type SumSimpleBasic_zdtczqCons1_closure,@object # @SumSimpleBasic_zdtczqCons1_closure + .globl SumSimpleBasic_zdtczqCons1_closure + .p2align 4 +SumSimpleBasic_zdtczqCons1_closure: + .quad ghczmprim_GHCziTypes_KindRepFun_con_info + .quad r3k9_closure$def+2 + .quad r3kb_closure$def+4 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtczqCons1_closure, 32 + + .type SumSimpleBasic_zdtczqCons3_bytes,@object # @SumSimpleBasic_zdtczqCons3_bytes + .section .rodata,"a",@progbits + .globl SumSimpleBasic_zdtczqCons3_bytes +SumSimpleBasic_zdtczqCons3_bytes: + .asciz "'Cons" + .size SumSimpleBasic_zdtczqCons3_bytes, 6 + + .type SumSimpleBasic_zdtczqCons2_closure,@object # @SumSimpleBasic_zdtczqCons2_closure + .data + .globl SumSimpleBasic_zdtczqCons2_closure + .p2align 3 +SumSimpleBasic_zdtczqCons2_closure: + .quad ghczmprim_GHCziTypes_TrNameS_con_info + .quad SumSimpleBasic_zdtczqCons3_bytes + .size SumSimpleBasic_zdtczqCons2_closure, 16 + + .type SumSimpleBasic_zdtczqCons_closure,@object # @SumSimpleBasic_zdtczqCons_closure + .globl SumSimpleBasic_zdtczqCons_closure + .p2align 4 +SumSimpleBasic_zdtczqCons_closure: + .quad ghczmprim_GHCziTypes_TyCon_con_info + .quad SumSimpleBasic_zdtrModule_closure+1 + .quad SumSimpleBasic_zdtczqCons2_closure+1 + .quad SumSimpleBasic_zdtczqCons1_closure+4 + .quad -7205385302398664762 # 0x9c01543e44b4ffc6 + .quad 6836440343659544598 # 0x5edfea4583fa0016 + .quad 1 # 0x1 + .quad 3 # 0x3 + .size SumSimpleBasic_zdtczqCons_closure, 64 + + .type SumSimpleBasic_zdwsum_closure,@object # @SumSimpleBasic_zdwsum_closure + .globl SumSimpleBasic_zdwsum_closure + .p2align 3 +SumSimpleBasic_zdwsum_closure: + .quad SumSimpleBasic_zdwsum_info$def + .size SumSimpleBasic_zdwsum_closure, 8 + + .type SumSimpleBasic_zdwupto_closure,@object # @SumSimpleBasic_zdwupto_closure + .globl SumSimpleBasic_zdwupto_closure + .p2align 3 +SumSimpleBasic_zdwupto_closure: + .quad SumSimpleBasic_zdwupto_info$def + .size SumSimpleBasic_zdwupto_closure, 8 + + .type SumSimpleBasic_hszusumzupure2_closure,@object # @SumSimpleBasic_hszusumzupure2_closure + .globl SumSimpleBasic_hszusumzupure2_closure + .p2align 4 +SumSimpleBasic_hszusumzupure2_closure: + .quad SumSimpleBasic_hszusumzupure2_info$def + .quad 0 # 0x0 + .quad 0 # 0x0 + .quad 0 # 0x0 + .size SumSimpleBasic_hszusumzupure2_closure, 32 + + .type SumSimpleBasic_hszusumzupure1_closure,@object # @SumSimpleBasic_hszusumzupure1_closure + .globl SumSimpleBasic_hszusumzupure1_closure + .p2align 3 +SumSimpleBasic_hszusumzupure1_closure: + .quad SumSimpleBasic_hszusumzupure1_info$def + .quad 0 # 0x0 + .size SumSimpleBasic_hszusumzupure1_closure, 16 + + .type SumSimpleBasic_hszusumzupure_closure,@object # @SumSimpleBasic_hszusumzupure_closure + .globl SumSimpleBasic_hszusumzupure_closure + .p2align 3 +SumSimpleBasic_hszusumzupure_closure: + .quad SumSimpleBasic_hszusumzupure_info$def + .quad 0 # 0x0 + .size SumSimpleBasic_hszusumzupure_closure, 16 + + .type SumSimpleBasic_Nil_closure,@object # @SumSimpleBasic_Nil_closure + .globl SumSimpleBasic_Nil_closure + .p2align 3 +SumSimpleBasic_Nil_closure: + .quad SumSimpleBasic_Nil_con_info$def + .size SumSimpleBasic_Nil_closure, 8 + + .type SumSimpleBasic_Cons_closure,@object # @SumSimpleBasic_Cons_closure + .globl SumSimpleBasic_Cons_closure + .p2align 3 +SumSimpleBasic_Cons_closure: + .quad SumSimpleBasic_Cons_info$def + .size SumSimpleBasic_Cons_closure, 8 + + .type i3st_str$def,@object # @"i3st_str$def" + .section .rodata,"a",@progbits +i3st_str$def: + .asciz "main:SumSimpleBasic.Nil" + .size i3st_str$def, 24 + + .type i3sD_str$def,@object # @"i3sD_str$def" +i3sD_str$def: + .asciz "main:SumSimpleBasic.Cons" + .size i3sD_str$def, 25 + + .type S3rl_srt$def,@object # @"S3rl_srt$def" + .p2align 4 +S3rl_srt$def: .quad base_GHCziIOziHandleziFD_stdout_closure .quad base_GHCziIOziHandleziText_hPutStr2_closure - .quad Sum_hszusumzupure2_closure - .quad Sum_hszusumzupure1_closure - .size S3kT_srt$def, 32 + .quad SumSimpleBasic_hszusumzupure2_closure + .quad SumSimpleBasic_hszusumzupure1_closure + .size S3rl_srt$def, 32 - .globl Sum_zdwsum_info -Sum_zdwsum_info = Sum_zdwsum_info$def - .globl Sum_hszusumzupure2_info -Sum_hszusumzupure2_info = Sum_hszusumzupure2_info$def - .globl Sum_hszusumzupure1_info -Sum_hszusumzupure1_info = Sum_hszusumzupure1_info$def - .globl Sum_hszusumzupure_info -Sum_hszusumzupure_info = Sum_hszusumzupure_info$def + .globl SumSimpleBasic_zdwsum_info +SumSimpleBasic_zdwsum_info = SumSimpleBasic_zdwsum_info$def + .globl SumSimpleBasic_zdwupto_info +SumSimpleBasic_zdwupto_info = SumSimpleBasic_zdwupto_info$def + .globl SumSimpleBasic_hszusumzupure2_info +SumSimpleBasic_hszusumzupure2_info = SumSimpleBasic_hszusumzupure2_info$def + .globl SumSimpleBasic_hszusumzupure1_info +SumSimpleBasic_hszusumzupure1_info = SumSimpleBasic_hszusumzupure1_info$def + .globl SumSimpleBasic_hszusumzupure_info +SumSimpleBasic_hszusumzupure_info = SumSimpleBasic_hszusumzupure_info$def + .globl SumSimpleBasic_Nil_con_info +SumSimpleBasic_Nil_con_info = SumSimpleBasic_Nil_con_info$def + .globl SumSimpleBasic_Cons_con_info +SumSimpleBasic_Cons_con_info = SumSimpleBasic_Cons_con_info$def .section ".note.GNU-stack","",@progbits diff --git a/playground/sum/sum-ghc-8.4.1.ll b/playground/sum/sum-ghc-8.4.1.ll index 2413b651..e6f91277 100644 --- a/playground/sum/sum-ghc-8.4.1.ll +++ b/playground/sum/sum-ghc-8.4.1.ll @@ -1,32 +1,31 @@ -; [1 of 1] Compiling Sum ( Sum.hs, Sum.o ) -; ==================== LLVM Code ==================== +;;;; LLVM Code ;;;; target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux" -; ==================== LLVM Code ==================== +;;;; LLVM Code ;;;; declare ccc i8* @memcpy$def(i8*, i8*, i64) -; ==================== LLVM Code ==================== +;;;; LLVM Code ;;;; declare ccc i8* @memmove$def(i8*, i8*, i64) -; ==================== LLVM Code ==================== +;;;; LLVM Code ;;;; declare ccc i8* @memset$def(i8*, i64, i64) -; ==================== LLVM Code ==================== +;;;; LLVM Code ;;;; declare ccc i64 @newSpark$def(i8*, i8*) -; ==================== LLVM Code ==================== +;;;; LLVM Code ;;;; !0 = !{!"root"} !1 = !{!"top", !0} !2 = !{!"stack", !1} @@ -36,110 +35,561 @@ declare ccc i64 @newSpark$def(i8*, i8*) -; ==================== LLVM Code ==================== +;;;; LLVM Code ;;;; -; ==================== LLVM Code ==================== -%Sum_zdtrModule4_bytes_struct = type <{[5 x i8]}> -@Sum_zdtrModule4_bytes$def = internal constant %Sum_zdtrModule4_bytes_struct<{[5 x i8] [i8 109, i8 97, i8 105, i8 110, i8 0]}>, align 1 -@Sum_zdtrModule4_bytes = alias i8, bitcast (%Sum_zdtrModule4_bytes_struct* @Sum_zdtrModule4_bytes$def to i8*) +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtrModule4_bytes_struct = type <{[5 x i8]}> +@SumSimpleBasic_zdtrModule4_bytes$def = internal constant %SumSimpleBasic_zdtrModule4_bytes_struct<{[5 x i8] [i8 109, i8 97, i8 105, i8 110, i8 0]}>, align 1 +@SumSimpleBasic_zdtrModule4_bytes = alias i8, bitcast (%SumSimpleBasic_zdtrModule4_bytes_struct* @SumSimpleBasic_zdtrModule4_bytes$def to i8*) -; ==================== LLVM Code ==================== -%Sum_zdtrModule3_closure_struct = type <{i64, i64}> -@Sum_zdtrModule3_closure$def = internal global %Sum_zdtrModule3_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_TrNameS_con_info to i64), i64 ptrtoint (%Sum_zdtrModule4_bytes_struct* @Sum_zdtrModule4_bytes$def to i64)}> -@Sum_zdtrModule3_closure = alias i8, bitcast (%Sum_zdtrModule3_closure_struct* @Sum_zdtrModule3_closure$def to i8*) +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtrModule3_closure_struct = type <{i64, i64}> +@SumSimpleBasic_zdtrModule3_closure$def = internal global %SumSimpleBasic_zdtrModule3_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_TrNameS_con_info to i64), i64 ptrtoint (%SumSimpleBasic_zdtrModule4_bytes_struct* @SumSimpleBasic_zdtrModule4_bytes$def to i64)}> +@SumSimpleBasic_zdtrModule3_closure = alias i8, bitcast (%SumSimpleBasic_zdtrModule3_closure_struct* @SumSimpleBasic_zdtrModule3_closure$def to i8*) -; ==================== LLVM Code ==================== -%Sum_zdtrModule2_bytes_struct = type <{[4 x i8]}> -@Sum_zdtrModule2_bytes$def = internal constant %Sum_zdtrModule2_bytes_struct<{[4 x i8] [i8 83, i8 117, i8 109, i8 0]}>, align 1 -@Sum_zdtrModule2_bytes = alias i8, bitcast (%Sum_zdtrModule2_bytes_struct* @Sum_zdtrModule2_bytes$def to i8*) +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtrModule2_bytes_struct = type <{[15 x i8]}> +@SumSimpleBasic_zdtrModule2_bytes$def = internal constant %SumSimpleBasic_zdtrModule2_bytes_struct<{[15 x i8] [i8 83, i8 117, i8 109, i8 83, i8 105, i8 109, i8 112, i8 108, i8 101, i8 66, i8 97, i8 115, i8 105, i8 99, i8 0]}>, align 1 +@SumSimpleBasic_zdtrModule2_bytes = alias i8, bitcast (%SumSimpleBasic_zdtrModule2_bytes_struct* @SumSimpleBasic_zdtrModule2_bytes$def to i8*) -; ==================== LLVM Code ==================== -%Sum_zdtrModule1_closure_struct = type <{i64, i64}> -@Sum_zdtrModule1_closure$def = internal global %Sum_zdtrModule1_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_TrNameS_con_info to i64), i64 ptrtoint (%Sum_zdtrModule2_bytes_struct* @Sum_zdtrModule2_bytes$def to i64)}> -@Sum_zdtrModule1_closure = alias i8, bitcast (%Sum_zdtrModule1_closure_struct* @Sum_zdtrModule1_closure$def to i8*) +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtrModule1_closure_struct = type <{i64, i64}> +@SumSimpleBasic_zdtrModule1_closure$def = internal global %SumSimpleBasic_zdtrModule1_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_TrNameS_con_info to i64), i64 ptrtoint (%SumSimpleBasic_zdtrModule2_bytes_struct* @SumSimpleBasic_zdtrModule2_bytes$def to i64)}> +@SumSimpleBasic_zdtrModule1_closure = alias i8, bitcast (%SumSimpleBasic_zdtrModule1_closure_struct* @SumSimpleBasic_zdtrModule1_closure$def to i8*) -; ==================== LLVM Code ==================== -%Sum_zdtrModule_closure_struct = type <{i64, i64, i64, i64}> -@Sum_zdtrModule_closure$def = internal global %Sum_zdtrModule_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_Module_con_info to i64), i64 add (i64 ptrtoint (%Sum_zdtrModule3_closure_struct* @Sum_zdtrModule3_closure$def to i64),i64 1), i64 add (i64 ptrtoint (%Sum_zdtrModule1_closure_struct* @Sum_zdtrModule1_closure$def to i64),i64 1), i64 3}> -@Sum_zdtrModule_closure = alias i8, bitcast (%Sum_zdtrModule_closure_struct* @Sum_zdtrModule_closure$def to i8*) +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtrModule_closure_struct = type <{i64, i64, i64, i64}> +@SumSimpleBasic_zdtrModule_closure$def = internal global %SumSimpleBasic_zdtrModule_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_Module_con_info to i64), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtrModule3_closure_struct* @SumSimpleBasic_zdtrModule3_closure$def to i64),i64 1), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtrModule1_closure_struct* @SumSimpleBasic_zdtrModule1_closure$def to i64),i64 1), i64 3}> +@SumSimpleBasic_zdtrModule_closure = alias i8, bitcast (%SumSimpleBasic_zdtrModule_closure_struct* @SumSimpleBasic_zdtrModule_closure$def to i8*) -; ==================== LLVM Code ==================== -%Sum_zdwsum_closure_struct = type <{i64}> -@Sum_zdwsum_closure$def = internal global %Sum_zdwsum_closure_struct<{i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_zdwsum_info$def to i64)}> -@Sum_zdwsum_closure = alias i8, bitcast (%Sum_zdwsum_closure_struct* @Sum_zdwsum_closure$def to i8*) +;;;; LLVM Code ;;;; +%r3k9_closure_struct = type <{i64, i64}> +@r3k9_closure$def = internal global %r3k9_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_KindRepVar_con_info to i64), i64 0}> +@r3k9_closure = internal alias i8, bitcast (%r3k9_closure_struct* @r3k9_closure$def to i8*) -; ==================== LLVM Code ==================== -@Sum_zdwsum_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_zdwsum_info$def to i8*) -define ghccc void @Sum_zdwsum_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64, i64}><{i64 12884901904, i64 0, i64 14}> +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtcList2_bytes_struct = type <{[5 x i8]}> +@SumSimpleBasic_zdtcList2_bytes$def = internal constant %SumSimpleBasic_zdtcList2_bytes_struct<{[5 x i8] [i8 76, i8 105, i8 115, i8 116, i8 0]}>, align 1 +@SumSimpleBasic_zdtcList2_bytes = alias i8, bitcast (%SumSimpleBasic_zdtcList2_bytes_struct* @SumSimpleBasic_zdtcList2_bytes$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtcList1_closure_struct = type <{i64, i64}> +@SumSimpleBasic_zdtcList1_closure$def = internal global %SumSimpleBasic_zdtcList1_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_TrNameS_con_info to i64), i64 ptrtoint (%SumSimpleBasic_zdtcList2_bytes_struct* @SumSimpleBasic_zdtcList2_bytes$def to i64)}> +@SumSimpleBasic_zdtcList1_closure = alias i8, bitcast (%SumSimpleBasic_zdtcList1_closure_struct* @SumSimpleBasic_zdtcList1_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtcList_closure_struct = type <{i64, i64, i64, i64, i64, i64, i64, i64}> +@SumSimpleBasic_zdtcList_closure$def = internal global %SumSimpleBasic_zdtcList_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_TyCon_con_info to i64), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtrModule_closure_struct* @SumSimpleBasic_zdtrModule_closure$def to i64),i64 1), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtcList1_closure_struct* @SumSimpleBasic_zdtcList1_closure$def to i64),i64 1), i64 ptrtoint (i8* @ghczmprim_GHCziTypes_krepzdztArrzt_closure to i64), i64 8125128733883036046, i64 8522174167308563467, i64 0, i64 3}> +@SumSimpleBasic_zdtcList_closure = alias i8, bitcast (%SumSimpleBasic_zdtcList_closure_struct* @SumSimpleBasic_zdtcList_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +%r3ka_closure_struct = type <{i64, i64, i64, i64}> +@r3ka_closure$def = internal global %r3ka_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_ZC_con_info to i64), i64 add (i64 ptrtoint (%r3k9_closure_struct* @r3k9_closure$def to i64),i64 2), i64 add (i64 ptrtoint (i8* @ghczmprim_GHCziTypes_ZMZN_closure to i64),i64 1), i64 3}> +@r3ka_closure = internal alias i8, bitcast (%r3ka_closure_struct* @r3ka_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtczqNil1_closure_struct = type <{i64, i64, i64, i64}> +@SumSimpleBasic_zdtczqNil1_closure$def = internal global %SumSimpleBasic_zdtczqNil1_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_KindRepTyConApp_con_info to i64), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtcList_closure_struct* @SumSimpleBasic_zdtcList_closure$def to i64),i64 1), i64 add (i64 ptrtoint (%r3ka_closure_struct* @r3ka_closure$def to i64),i64 2), i64 3}> +@SumSimpleBasic_zdtczqNil1_closure = alias i8, bitcast (%SumSimpleBasic_zdtczqNil1_closure_struct* @SumSimpleBasic_zdtczqNil1_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtczqNil3_bytes_struct = type <{[5 x i8]}> +@SumSimpleBasic_zdtczqNil3_bytes$def = internal constant %SumSimpleBasic_zdtczqNil3_bytes_struct<{[5 x i8] [i8 39, i8 78, i8 105, i8 108, i8 0]}>, align 1 +@SumSimpleBasic_zdtczqNil3_bytes = alias i8, bitcast (%SumSimpleBasic_zdtczqNil3_bytes_struct* @SumSimpleBasic_zdtczqNil3_bytes$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtczqNil2_closure_struct = type <{i64, i64}> +@SumSimpleBasic_zdtczqNil2_closure$def = internal global %SumSimpleBasic_zdtczqNil2_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_TrNameS_con_info to i64), i64 ptrtoint (%SumSimpleBasic_zdtczqNil3_bytes_struct* @SumSimpleBasic_zdtczqNil3_bytes$def to i64)}> +@SumSimpleBasic_zdtczqNil2_closure = alias i8, bitcast (%SumSimpleBasic_zdtczqNil2_closure_struct* @SumSimpleBasic_zdtczqNil2_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtczqNil_closure_struct = type <{i64, i64, i64, i64, i64, i64, i64, i64}> +@SumSimpleBasic_zdtczqNil_closure$def = internal global %SumSimpleBasic_zdtczqNil_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_TyCon_con_info to i64), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtrModule_closure_struct* @SumSimpleBasic_zdtrModule_closure$def to i64),i64 1), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtczqNil2_closure_struct* @SumSimpleBasic_zdtczqNil2_closure$def to i64),i64 1), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtczqNil1_closure_struct* @SumSimpleBasic_zdtczqNil1_closure$def to i64),i64 1), i64 3225848470370281545, i64 8987752080532592311, i64 1, i64 3}> +@SumSimpleBasic_zdtczqNil_closure = alias i8, bitcast (%SumSimpleBasic_zdtczqNil_closure_struct* @SumSimpleBasic_zdtczqNil_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +%r3kb_closure_struct = type <{i64, i64, i64, i64}> +@r3kb_closure$def = internal global %r3kb_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_KindRepFun_con_info to i64), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtczqNil1_closure_struct* @SumSimpleBasic_zdtczqNil1_closure$def to i64),i64 1), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtczqNil1_closure_struct* @SumSimpleBasic_zdtczqNil1_closure$def to i64),i64 1), i64 3}> +@r3kb_closure = internal alias i8, bitcast (%r3kb_closure_struct* @r3kb_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtczqCons1_closure_struct = type <{i64, i64, i64, i64}> +@SumSimpleBasic_zdtczqCons1_closure$def = internal global %SumSimpleBasic_zdtczqCons1_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_KindRepFun_con_info to i64), i64 add (i64 ptrtoint (%r3k9_closure_struct* @r3k9_closure$def to i64),i64 2), i64 add (i64 ptrtoint (%r3kb_closure_struct* @r3kb_closure$def to i64),i64 4), i64 3}> +@SumSimpleBasic_zdtczqCons1_closure = alias i8, bitcast (%SumSimpleBasic_zdtczqCons1_closure_struct* @SumSimpleBasic_zdtczqCons1_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtczqCons3_bytes_struct = type <{[6 x i8]}> +@SumSimpleBasic_zdtczqCons3_bytes$def = internal constant %SumSimpleBasic_zdtczqCons3_bytes_struct<{[6 x i8] [i8 39, i8 67, i8 111, i8 110, i8 115, i8 0]}>, align 1 +@SumSimpleBasic_zdtczqCons3_bytes = alias i8, bitcast (%SumSimpleBasic_zdtczqCons3_bytes_struct* @SumSimpleBasic_zdtczqCons3_bytes$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtczqCons2_closure_struct = type <{i64, i64}> +@SumSimpleBasic_zdtczqCons2_closure$def = internal global %SumSimpleBasic_zdtczqCons2_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_TrNameS_con_info to i64), i64 ptrtoint (%SumSimpleBasic_zdtczqCons3_bytes_struct* @SumSimpleBasic_zdtczqCons3_bytes$def to i64)}> +@SumSimpleBasic_zdtczqCons2_closure = alias i8, bitcast (%SumSimpleBasic_zdtczqCons2_closure_struct* @SumSimpleBasic_zdtczqCons2_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdtczqCons_closure_struct = type <{i64, i64, i64, i64, i64, i64, i64, i64}> +@SumSimpleBasic_zdtczqCons_closure$def = internal global %SumSimpleBasic_zdtczqCons_closure_struct<{i64 ptrtoint (i8* @ghczmprim_GHCziTypes_TyCon_con_info to i64), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtrModule_closure_struct* @SumSimpleBasic_zdtrModule_closure$def to i64),i64 1), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtczqCons2_closure_struct* @SumSimpleBasic_zdtczqCons2_closure$def to i64),i64 1), i64 add (i64 ptrtoint (%SumSimpleBasic_zdtczqCons1_closure_struct* @SumSimpleBasic_zdtczqCons1_closure$def to i64),i64 4), i64 -7205385302398664762, i64 6836440343659544598, i64 1, i64 3}> +@SumSimpleBasic_zdtczqCons_closure = alias i8, bitcast (%SumSimpleBasic_zdtczqCons_closure_struct* @SumSimpleBasic_zdtczqCons_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdwsum_closure_struct = type <{i64}> +@SumSimpleBasic_zdwsum_closure$def = internal global %SumSimpleBasic_zdwsum_closure_struct<{i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_zdwsum_info$def to i64)}> +@SumSimpleBasic_zdwsum_closure = alias i8, bitcast (%SumSimpleBasic_zdwsum_closure_struct* @SumSimpleBasic_zdwsum_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +@SumSimpleBasic_zdwsum_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_zdwsum_info$def to i8*) +define ghccc void @SumSimpleBasic_zdwsum_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64, i64}><{i64 4294967301, i64 0, i64 14}> { -c3is: - %ls3ib = alloca i64, i32 1 - %ls3ia = alloca i64, i32 1 - %ls3i9 = alloca i64, i32 1 - %ls3id = alloca i64, i32 1 +c3kG: %R1_Var = alloca i64, i32 1 store i64 %R1_Arg, i64* %R1_Var - store i64 %R4_Arg, i64* %ls3ib - store i64 %R3_Arg, i64* %ls3ia - store i64 %R2_Arg, i64* %ls3i9 - br label %c3ik -c3ik: - %ln3iA = load i64, i64* %ls3ia - %ln3iB = load i64, i64* %ls3ib - %ln3iC = icmp sgt i64 %ln3iA, %ln3iB - %ln3iD = zext i1 %ln3iC to i64 - switch i64 %ln3iD, label %c3iq [i64 1, label %c3ir] -c3iq: - %ln3iE = load i64, i64* %ls3i9 - %ln3iF = load i64, i64* %ls3ia - %ln3iG = add i64 %ln3iE, %ln3iF - store i64 %ln3iG, i64* %ls3id - %ln3iH = load i64, i64* %ls3ia - %ln3iI = add i64 %ln3iH, 1 - store i64 %ln3iI, i64* %ls3ia - %ln3iJ = load i64, i64* %ls3id - store i64 %ln3iJ, i64* %ls3i9 - br label %c3ik -c3ir: - %ln3iK = load i64, i64* %ls3i9 - store i64 %ln3iK, i64* %R1_Var - %ln3iL = getelementptr inbounds i64, i64* %Sp_Arg, i32 0 - %ln3iM = bitcast i64* %ln3iL to i64* - %ln3iN = load i64, i64* %ln3iM, !tbaa !2 - %ln3iO = inttoptr i64 %ln3iN to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* - %ln3iP = load i64, i64* %R1_Var - tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3iO( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %ln3iP, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + %Sp_Var = alloca i64*, i32 1 + store i64* %Sp_Arg, i64** %Sp_Var + %R2_Var = alloca i64, i32 1 + store i64 %R2_Arg, i64* %R2_Var + %ln3l3 = load i64*, i64** %Sp_Var + %ln3l4 = getelementptr inbounds i64, i64* %ln3l3, i32 -2 + %ln3l5 = ptrtoint i64* %ln3l4 to i64 + %ln3l6 = icmp ult i64 %ln3l5, %SpLim_Arg + %ln3l8 = call ccc i1 (i1, i1) @llvm.expect.i1( i1 %ln3l6, i1 0 ) + br i1 %ln3l8, label %c3kH, label %c3kI +c3kI: + %ln3la = ptrtoint void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3kz_info$def to i64 + %ln3l9 = load i64*, i64** %Sp_Var + %ln3lb = getelementptr inbounds i64, i64* %ln3l9, i32 -1 + store i64 %ln3la, i64* %ln3lb, !tbaa !2 + %ln3lc = load i64, i64* %R2_Var + store i64 %ln3lc, i64* %R1_Var + %ln3ld = load i64*, i64** %Sp_Var + %ln3le = getelementptr inbounds i64, i64* %ln3ld, i32 -1 + %ln3lf = ptrtoint i64* %ln3le to i64 + %ln3lg = inttoptr i64 %ln3lf to i64* + store i64* %ln3lg, i64** %Sp_Var + %ln3lh = load i64, i64* %R1_Var + %ln3li = and i64 %ln3lh, 7 + %ln3lj = icmp ne i64 %ln3li, 0 + br i1 %ln3lj, label %u3l2, label %c3kA +c3kA: + %ln3ll = load i64, i64* %R1_Var + %ln3lm = inttoptr i64 %ln3ll to i64* + %ln3ln = load i64, i64* %ln3lm, !tbaa !4 + %ln3lo = inttoptr i64 %ln3ln to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3lp = load i64*, i64** %Sp_Var + %ln3lq = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3lo( i64* %Base_Arg, i64* %ln3lp, i64* %Hp_Arg, i64 %ln3lq, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +u3l2: + %ln3lr = bitcast void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3kz_info$def to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3ls = load i64*, i64** %Sp_Var + %ln3lt = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3lr( i64* %Base_Arg, i64* %ln3ls, i64* %Hp_Arg, i64 %ln3lt, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +c3kH: + %ln3lu = load i64, i64* %R2_Var + store i64 %ln3lu, i64* %R2_Var + %ln3lv = ptrtoint %SumSimpleBasic_zdwsum_closure_struct* @SumSimpleBasic_zdwsum_closure$def to i64 + store i64 %ln3lv, i64* %R1_Var + %ln3lw = getelementptr inbounds i64, i64* %Base_Arg, i32 -1 + %ln3lx = bitcast i64* %ln3lw to i64* + %ln3ly = load i64, i64* %ln3lx, !tbaa !5 + %ln3lz = inttoptr i64 %ln3ly to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3lA = load i64*, i64** %Sp_Var + %ln3lB = load i64, i64* %R1_Var + %ln3lC = load i64, i64* %R2_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3lz( i64* %Base_Arg, i64* %ln3lA, i64* %Hp_Arg, i64 %ln3lB, i64 %ln3lC, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +} +declare ccc i1 @llvm.expect.i1(i1, i1) + + + +;;;; LLVM Code ;;;; +@c3kz_info = internal alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3kz_info$def to i8*) +define internal ghccc void @c3kz_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 0, i64 30}> +{ +c3kz: + %R1_Var = alloca i64, i32 1 + store i64 %R1_Arg, i64* %R1_Var + %Sp_Var = alloca i64*, i32 1 + store i64* %Sp_Arg, i64** %Sp_Var + %ls3kg = alloca i64, i32 1 + %ln3lD = load i64, i64* %R1_Var + %ln3lE = and i64 %ln3lD, 7 + switch i64 %ln3lE, label %c3kD [i64 1, label %c3kD + i64 2, label %c3kE] +c3kD: + store i64 0, i64* %R1_Var + %ln3lF = load i64*, i64** %Sp_Var + %ln3lG = getelementptr inbounds i64, i64* %ln3lF, i32 1 + %ln3lH = ptrtoint i64* %ln3lG to i64 + %ln3lI = inttoptr i64 %ln3lH to i64* + store i64* %ln3lI, i64** %Sp_Var + %ln3lJ = load i64*, i64** %Sp_Var + %ln3lK = getelementptr inbounds i64, i64* %ln3lJ, i32 0 + %ln3lL = bitcast i64* %ln3lK to i64* + %ln3lM = load i64, i64* %ln3lL, !tbaa !2 + %ln3lN = inttoptr i64 %ln3lM to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3lO = load i64*, i64** %Sp_Var + %ln3lP = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3lN( i64* %Base_Arg, i64* %ln3lO, i64* %Hp_Arg, i64 %ln3lP, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +c3kE: + %ln3lR = ptrtoint void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3kO_info$def to i64 + %ln3lQ = load i64*, i64** %Sp_Var + %ln3lS = getelementptr inbounds i64, i64* %ln3lQ, i32 -1 + store i64 %ln3lR, i64* %ln3lS, !tbaa !2 + %ln3lV = load i64, i64* %R1_Var + %ln3lW = add i64 %ln3lV, 14 + %ln3lX = inttoptr i64 %ln3lW to i64* + %ln3lY = load i64, i64* %ln3lX, !tbaa !4 + store i64 %ln3lY, i64* %ls3kg + %ln3m1 = load i64, i64* %R1_Var + %ln3m2 = add i64 %ln3m1, 6 + %ln3m3 = inttoptr i64 %ln3m2 to i64* + %ln3m4 = load i64, i64* %ln3m3, !tbaa !4 + store i64 %ln3m4, i64* %R1_Var + %ln3m6 = load i64, i64* %ls3kg + %ln3m5 = load i64*, i64** %Sp_Var + %ln3m7 = getelementptr inbounds i64, i64* %ln3m5, i32 0 + store i64 %ln3m6, i64* %ln3m7, !tbaa !2 + %ln3m8 = load i64*, i64** %Sp_Var + %ln3m9 = getelementptr inbounds i64, i64* %ln3m8, i32 -1 + %ln3ma = ptrtoint i64* %ln3m9 to i64 + %ln3mb = inttoptr i64 %ln3ma to i64* + store i64* %ln3mb, i64** %Sp_Var + %ln3mc = load i64, i64* %R1_Var + %ln3md = and i64 %ln3mc, 7 + %ln3me = icmp ne i64 %ln3md, 0 + br i1 %ln3me, label %u3l1, label %c3kP +c3kP: + %ln3mg = load i64, i64* %R1_Var + %ln3mh = inttoptr i64 %ln3mg to i64* + %ln3mi = load i64, i64* %ln3mh, !tbaa !4 + %ln3mj = inttoptr i64 %ln3mi to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3mk = load i64*, i64** %Sp_Var + %ln3ml = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3mj( i64* %Base_Arg, i64* %ln3mk, i64* %Hp_Arg, i64 %ln3ml, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +u3l1: + %ln3mm = bitcast void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3kO_info$def to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3mn = load i64*, i64** %Sp_Var + %ln3mo = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3mm( i64* %Base_Arg, i64* %ln3mn, i64* %Hp_Arg, i64 %ln3mo, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind ret void } -; ==================== LLVM Code ==================== -%Sum_hszusumzupure2_closure_struct = type <{i64, i64, i64, i64}> -@Sum_hszusumzupure2_closure$def = internal global %Sum_hszusumzupure2_closure_struct<{i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_hszusumzupure2_info$def to i64), i64 0, i64 0, i64 0}> -@Sum_hszusumzupure2_closure = alias i8, bitcast (%Sum_hszusumzupure2_closure_struct* @Sum_hszusumzupure2_closure$def to i8*) - - - -; ==================== LLVM Code ==================== -@Sum_hszusumzupure2_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_hszusumzupure2_info$def to i8*) -define ghccc void @Sum_hszusumzupure2_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 0, i64 21}> +;;;; LLVM Code ;;;; +@c3kO_info = internal alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3kO_info$def to i8*) +define internal ghccc void @c3kO_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 1, i64 30}> { -c3iY: +c3kO: + %R2_Var = alloca i64, i32 1 + store i64 undef, i64* %R2_Var + %ln3mp = ptrtoint void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3kT_info$def to i64 + %ln3mq = getelementptr inbounds i64, i64* %Sp_Arg, i32 0 + store i64 %ln3mp, i64* %ln3mq, !tbaa !2 + %ln3mr = getelementptr inbounds i64, i64* %Sp_Arg, i32 1 + %ln3ms = bitcast i64* %ln3mr to i64* + %ln3mt = load i64, i64* %ln3ms, !tbaa !2 + store i64 %ln3mt, i64* %R2_Var + %ln3mu = add i64 %R1_Arg, 7 + %ln3mv = inttoptr i64 %ln3mu to i64* + %ln3mw = load i64, i64* %ln3mv, !tbaa !4 + %ln3mx = getelementptr inbounds i64, i64* %Sp_Arg, i32 1 + store i64 %ln3mw, i64* %ln3mx, !tbaa !2 + %ln3my = bitcast void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_zdwsum_info$def to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3mz = load i64, i64* %R2_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3my( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %R1_Arg, i64 %ln3mz, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +} + + + +;;;; LLVM Code ;;;; +@c3kT_info = internal alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3kT_info$def to i8*) +define internal ghccc void @c3kT_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 65, i64 30}> +{ +c3kT: + %R1_Var = alloca i64, i32 1 + store i64 %R1_Arg, i64* %R1_Var + %Sp_Var = alloca i64*, i32 1 + store i64* %Sp_Arg, i64** %Sp_Var + %ln3mA = load i64*, i64** %Sp_Var + %ln3mB = getelementptr inbounds i64, i64* %ln3mA, i32 1 + %ln3mC = bitcast i64* %ln3mB to i64* + %ln3mD = load i64, i64* %ln3mC, !tbaa !2 + %ln3mE = load i64, i64* %R1_Var + %ln3mF = add i64 %ln3mD, %ln3mE + store i64 %ln3mF, i64* %R1_Var + %ln3mG = load i64*, i64** %Sp_Var + %ln3mH = getelementptr inbounds i64, i64* %ln3mG, i32 2 + %ln3mI = ptrtoint i64* %ln3mH to i64 + %ln3mJ = inttoptr i64 %ln3mI to i64* + store i64* %ln3mJ, i64** %Sp_Var + %ln3mK = load i64*, i64** %Sp_Var + %ln3mL = getelementptr inbounds i64, i64* %ln3mK, i32 0 + %ln3mM = bitcast i64* %ln3mL to i64* + %ln3mN = load i64, i64* %ln3mM, !tbaa !2 + %ln3mO = inttoptr i64 %ln3mN to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3mP = load i64*, i64** %Sp_Var + %ln3mQ = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3mO( i64* %Base_Arg, i64* %ln3mP, i64* %Hp_Arg, i64 %ln3mQ, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +} + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_zdwupto_closure_struct = type <{i64}> +@SumSimpleBasic_zdwupto_closure$def = internal global %SumSimpleBasic_zdwupto_closure_struct<{i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_zdwupto_info$def to i64)}> +@SumSimpleBasic_zdwupto_closure = alias i8, bitcast (%SumSimpleBasic_zdwupto_closure_struct* @SumSimpleBasic_zdwupto_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +@s3kp_info = internal alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @s3kp_info$def to i8*) +define internal ghccc void @s3kp_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 8589934592, i64 20}> +{ +c3n4: + %R3_Var = alloca i64, i32 1 + store i64 undef, i64* %R3_Var + %R2_Var = alloca i64, i32 1 + store i64 undef, i64* %R2_Var + %Sp_Var = alloca i64*, i32 1 + store i64* %Sp_Arg, i64** %Sp_Var + %R1_Var = alloca i64, i32 1 + store i64 %R1_Arg, i64* %R1_Var + %ln3nh = load i64*, i64** %Sp_Var + %ln3ni = getelementptr inbounds i64, i64* %ln3nh, i32 -2 + %ln3nj = ptrtoint i64* %ln3ni to i64 + %ln3nk = icmp ult i64 %ln3nj, %SpLim_Arg + %ln3nl = call ccc i1 (i1, i1) @llvm.expect.i1( i1 %ln3nk, i1 0 ) + br i1 %ln3nl, label %c3n5, label %c3n6 +c3n6: + %ln3nn = ptrtoint i8* @stg_upd_frame_info to i64 + %ln3nm = load i64*, i64** %Sp_Var + %ln3no = getelementptr inbounds i64, i64* %ln3nm, i32 -2 + store i64 %ln3nn, i64* %ln3no, !tbaa !2 + %ln3nq = load i64, i64* %R1_Var + %ln3np = load i64*, i64** %Sp_Var + %ln3nr = getelementptr inbounds i64, i64* %ln3np, i32 -1 + store i64 %ln3nq, i64* %ln3nr, !tbaa !2 + %ln3nu = load i64, i64* %R1_Var + %ln3nv = add i64 %ln3nu, 24 + %ln3nw = inttoptr i64 %ln3nv to i64* + %ln3nx = load i64, i64* %ln3nw, !tbaa !4 + store i64 %ln3nx, i64* %R3_Var + %ln3nA = load i64, i64* %R1_Var + %ln3nB = add i64 %ln3nA, 16 + %ln3nC = inttoptr i64 %ln3nB to i64* + %ln3nD = load i64, i64* %ln3nC, !tbaa !4 + %ln3nE = add i64 %ln3nD, 1 + store i64 %ln3nE, i64* %R2_Var + %ln3nF = load i64*, i64** %Sp_Var + %ln3nG = getelementptr inbounds i64, i64* %ln3nF, i32 -2 + %ln3nH = ptrtoint i64* %ln3nG to i64 + %ln3nI = inttoptr i64 %ln3nH to i64* + store i64* %ln3nI, i64** %Sp_Var + %ln3nJ = bitcast void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_zdwupto_info$def to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3nK = load i64*, i64** %Sp_Var + %ln3nL = load i64, i64* %R1_Var + %ln3nM = load i64, i64* %R2_Var + %ln3nN = load i64, i64* %R3_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3nJ( i64* %Base_Arg, i64* %ln3nK, i64* %Hp_Arg, i64 %ln3nL, i64 %ln3nM, i64 %ln3nN, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +c3n5: + %ln3nO = load i64, i64* %R1_Var + store i64 %ln3nO, i64* %R1_Var + %ln3nP = getelementptr inbounds i64, i64* %Base_Arg, i32 -2 + %ln3nQ = bitcast i64* %ln3nP to i64* + %ln3nR = load i64, i64* %ln3nQ, !tbaa !5 + %ln3nS = inttoptr i64 %ln3nR to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3nT = load i64*, i64** %Sp_Var + %ln3nU = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3nS( i64* %Base_Arg, i64* %ln3nT, i64* %Hp_Arg, i64 %ln3nU, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +} + + + +;;;; LLVM Code ;;;; +@SumSimpleBasic_zdwupto_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_zdwupto_info$def to i8*) +define ghccc void @SumSimpleBasic_zdwupto_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64, i64}><{i64 8589934604, i64 0, i64 14}> +{ +c3na: + %Hp_Var = alloca i64*, i32 1 + store i64* %Hp_Arg, i64** %Hp_Var + %R1_Var = alloca i64, i32 1 + store i64 %R1_Arg, i64* %R1_Var + %R3_Var = alloca i64, i32 1 + store i64 %R3_Arg, i64* %R3_Var + %R2_Var = alloca i64, i32 1 + store i64 %R2_Arg, i64* %R2_Var + %ln3nV = load i64*, i64** %Hp_Var + %ln3nW = getelementptr inbounds i64, i64* %ln3nV, i32 9 + %ln3nX = ptrtoint i64* %ln3nW to i64 + %ln3nY = inttoptr i64 %ln3nX to i64* + store i64* %ln3nY, i64** %Hp_Var + %ln3nZ = load i64*, i64** %Hp_Var + %ln3o0 = ptrtoint i64* %ln3nZ to i64 + %ln3o1 = getelementptr inbounds i64, i64* %Base_Arg, i32 107 + %ln3o2 = bitcast i64* %ln3o1 to i64* + %ln3o3 = load i64, i64* %ln3o2, !tbaa !5 + %ln3o4 = icmp ugt i64 %ln3o0, %ln3o3 + %ln3o5 = call ccc i1 (i1, i1) @llvm.expect.i1( i1 %ln3o4, i1 0 ) + br i1 %ln3o5, label %c3ne, label %c3nd +c3nd: + %ln3o6 = load i64, i64* %R2_Var + %ln3o7 = load i64, i64* %R3_Var + %ln3o8 = icmp sgt i64 %ln3o6, %ln3o7 + %ln3o9 = zext i1 %ln3o8 to i64 + switch i64 %ln3o9, label %c3n8 [i64 1, label %c3n9] +c3n8: + %ln3ob = ptrtoint void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @s3kp_info$def to i64 + %ln3oa = load i64*, i64** %Hp_Var + %ln3oc = getelementptr inbounds i64, i64* %ln3oa, i32 -8 + store i64 %ln3ob, i64* %ln3oc, !tbaa !3 + %ln3oe = load i64, i64* %R2_Var + %ln3od = load i64*, i64** %Hp_Var + %ln3of = getelementptr inbounds i64, i64* %ln3od, i32 -6 + store i64 %ln3oe, i64* %ln3of, !tbaa !3 + %ln3oh = load i64, i64* %R3_Var + %ln3og = load i64*, i64** %Hp_Var + %ln3oi = getelementptr inbounds i64, i64* %ln3og, i32 -5 + store i64 %ln3oh, i64* %ln3oi, !tbaa !3 + %ln3ok = ptrtoint i8* @ghczmprim_GHCziTypes_Izh_con_info to i64 + %ln3oj = load i64*, i64** %Hp_Var + %ln3ol = getelementptr inbounds i64, i64* %ln3oj, i32 -4 + store i64 %ln3ok, i64* %ln3ol, !tbaa !3 + %ln3on = load i64, i64* %R2_Var + %ln3om = load i64*, i64** %Hp_Var + %ln3oo = getelementptr inbounds i64, i64* %ln3om, i32 -3 + store i64 %ln3on, i64* %ln3oo, !tbaa !3 + %ln3oq = ptrtoint i8* @SumSimpleBasic_Cons_con_info to i64 + %ln3op = load i64*, i64** %Hp_Var + %ln3or = getelementptr inbounds i64, i64* %ln3op, i32 -2 + store i64 %ln3oq, i64* %ln3or, !tbaa !3 + %ln3ou = load i64*, i64** %Hp_Var + %ln3ov = ptrtoint i64* %ln3ou to i64 + %ln3ow = add i64 %ln3ov, -31 + %ln3os = load i64*, i64** %Hp_Var + %ln3ox = getelementptr inbounds i64, i64* %ln3os, i32 -1 + store i64 %ln3ow, i64* %ln3ox, !tbaa !3 + %ln3oz = load i64*, i64** %Hp_Var + %ln3oA = getelementptr inbounds i64, i64* %ln3oz, i32 -8 + %ln3oB = ptrtoint i64* %ln3oA to i64 + %ln3oy = load i64*, i64** %Hp_Var + %ln3oC = getelementptr inbounds i64, i64* %ln3oy, i32 0 + store i64 %ln3oB, i64* %ln3oC, !tbaa !3 + %ln3oE = load i64*, i64** %Hp_Var + %ln3oF = ptrtoint i64* %ln3oE to i64 + %ln3oG = add i64 %ln3oF, -14 + store i64 %ln3oG, i64* %R1_Var + %ln3oH = getelementptr inbounds i64, i64* %Sp_Arg, i32 0 + %ln3oI = bitcast i64* %ln3oH to i64* + %ln3oJ = load i64, i64* %ln3oI, !tbaa !2 + %ln3oK = inttoptr i64 %ln3oJ to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3oL = load i64*, i64** %Hp_Var + %ln3oM = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3oK( i64* %Base_Arg, i64* %Sp_Arg, i64* %ln3oL, i64 %ln3oM, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +c3n9: + %ln3oN = load i64*, i64** %Hp_Var + %ln3oO = getelementptr inbounds i64, i64* %ln3oN, i32 -9 + %ln3oP = ptrtoint i64* %ln3oO to i64 + %ln3oQ = inttoptr i64 %ln3oP to i64* + store i64* %ln3oQ, i64** %Hp_Var + %ln3oR = ptrtoint i8* @SumSimpleBasic_Nil_closure to i64 + %ln3oS = add i64 %ln3oR, 1 + store i64 %ln3oS, i64* %R1_Var + %ln3oT = getelementptr inbounds i64, i64* %Sp_Arg, i32 0 + %ln3oU = bitcast i64* %ln3oT to i64* + %ln3oV = load i64, i64* %ln3oU, !tbaa !2 + %ln3oW = inttoptr i64 %ln3oV to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3oX = load i64*, i64** %Hp_Var + %ln3oY = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3oW( i64* %Base_Arg, i64* %Sp_Arg, i64* %ln3oX, i64 %ln3oY, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +c3ne: + %ln3oZ = getelementptr inbounds i64, i64* %Base_Arg, i32 113 + store i64 72, i64* %ln3oZ, !tbaa !5 + %ln3p0 = load i64, i64* %R3_Var + store i64 %ln3p0, i64* %R3_Var + %ln3p1 = load i64, i64* %R2_Var + store i64 %ln3p1, i64* %R2_Var + %ln3p2 = ptrtoint %SumSimpleBasic_zdwupto_closure_struct* @SumSimpleBasic_zdwupto_closure$def to i64 + store i64 %ln3p2, i64* %R1_Var + %ln3p3 = getelementptr inbounds i64, i64* %Base_Arg, i32 -1 + %ln3p4 = bitcast i64* %ln3p3 to i64* + %ln3p5 = load i64, i64* %ln3p4, !tbaa !5 + %ln3p6 = inttoptr i64 %ln3p5 to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3p7 = load i64*, i64** %Hp_Var + %ln3p8 = load i64, i64* %R1_Var + %ln3p9 = load i64, i64* %R2_Var + %ln3pa = load i64, i64* %R3_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3p6( i64* %Base_Arg, i64* %Sp_Arg, i64* %ln3p7, i64 %ln3p8, i64 %ln3p9, i64 %ln3pa, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +} + + + +;;;; LLVM Code ;;;; +%SumSimpleBasic_hszusumzupure2_closure_struct = type <{i64, i64, i64, i64}> +@SumSimpleBasic_hszusumzupure2_closure$def = internal global %SumSimpleBasic_hszusumzupure2_closure_struct<{i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_hszusumzupure2_info$def to i64), i64 0, i64 0, i64 0}> +@SumSimpleBasic_hszusumzupure2_closure = alias i8, bitcast (%SumSimpleBasic_hszusumzupure2_closure_struct* @SumSimpleBasic_hszusumzupure2_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +@SumSimpleBasic_hszusumzupure2_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_hszusumzupure2_info$def to i8*) +define ghccc void @SumSimpleBasic_hszusumzupure2_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 0, i64 21}> +{ +c3pj: %R3_Var = alloca i64, i32 1 store i64 undef, i64* %R3_Var %R4_Var = alloca i64, i32 1 @@ -172,25 +622,25 @@ c3iY: store float undef, float* %F6_Var %D6_Var = alloca double, i32 1 store double undef, double* %D6_Var - %lc3iT = alloca i64, i32 1 + %lc3pe = alloca i64, i32 1 %R2_Var = alloca i64, i32 1 store i64 undef, i64* %R2_Var %Sp_Var = alloca i64*, i32 1 store i64* %Sp_Arg, i64** %Sp_Var %R1_Var = alloca i64, i32 1 store i64 %R1_Arg, i64* %R1_Var - %ln3ja = load i64*, i64** %Sp_Var - %ln3jb = getelementptr inbounds i64, i64* %ln3ja, i32 -3 - %ln3jc = ptrtoint i64* %ln3jb to i64 - %ln3jd = icmp ult i64 %ln3jc, %SpLim_Arg - %ln3jf = call ccc i1 (i1, i1) @llvm.expect.i1( i1 %ln3jd, i1 0 ) - br i1 %ln3jf, label %c3j4, label %c3j5 -c3j5: - %ln3jg = ptrtoint i64* %Base_Arg to i64 - %ln3jh = inttoptr i64 %ln3jg to i8* - %ln3ji = load i64, i64* %R1_Var - %ln3jj = inttoptr i64 %ln3ji to i8* - %ln3jk = bitcast i8* @newCAF to i8* (i8*, i8*)* + %ln3pA = load i64*, i64** %Sp_Var + %ln3pB = getelementptr inbounds i64, i64* %ln3pA, i32 -3 + %ln3pC = ptrtoint i64* %ln3pB to i64 + %ln3pD = icmp ult i64 %ln3pC, %SpLim_Arg + %ln3pE = call ccc i1 (i1, i1) @llvm.expect.i1( i1 %ln3pD, i1 0 ) + br i1 %ln3pE, label %c3pt, label %c3pu +c3pu: + %ln3pF = ptrtoint i64* %Base_Arg to i64 + %ln3pG = inttoptr i64 %ln3pF to i8* + %ln3pH = load i64, i64* %R1_Var + %ln3pI = inttoptr i64 %ln3pH to i8* + %ln3pJ = bitcast i8* @newCAF to i8* (i8*, i8*)* store i64 undef, i64* %R3_Var store i64 undef, i64* %R4_Var store i64 undef, i64* %R5_Var @@ -207,100 +657,116 @@ c3j5: store double undef, double* %D5_Var store float undef, float* %F6_Var store double undef, double* %D6_Var - %ln3jl = call ccc i8* (i8*, i8*) %ln3jk( i8* %ln3jh, i8* %ln3jj ) nounwind - %ln3jm = ptrtoint i8* %ln3jl to i64 - store i64 %ln3jm, i64* %lc3iT - %ln3jn = load i64, i64* %lc3iT - %ln3jo = icmp eq i64 %ln3jn, 0 - br i1 %ln3jo, label %c3iV, label %c3iU -c3iU: - %ln3jq = ptrtoint i8* @stg_bh_upd_frame_info to i64 - %ln3jp = load i64*, i64** %Sp_Var - %ln3jr = getelementptr inbounds i64, i64* %ln3jp, i32 -2 - store i64 %ln3jq, i64* %ln3jr, !tbaa !2 - %ln3jt = load i64, i64* %lc3iT - %ln3js = load i64*, i64** %Sp_Var - %ln3ju = getelementptr inbounds i64, i64* %ln3js, i32 -1 - store i64 %ln3jt, i64* %ln3ju, !tbaa !2 - %ln3jw = ptrtoint void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3iW_info$def to i64 - %ln3jv = load i64*, i64** %Sp_Var - %ln3jx = getelementptr inbounds i64, i64* %ln3jv, i32 -3 - store i64 %ln3jw, i64* %ln3jx, !tbaa !2 - store i64 100000, i64* %R4_Var - store i64 1, i64* %R3_Var - store i64 0, i64* %R2_Var - %ln3jy = load i64*, i64** %Sp_Var - %ln3jz = getelementptr inbounds i64, i64* %ln3jy, i32 -3 - %ln3jA = ptrtoint i64* %ln3jz to i64 - %ln3jB = inttoptr i64 %ln3jA to i64* - store i64* %ln3jB, i64** %Sp_Var - %ln3jC = bitcast void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_zdwsum_info$def to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* - %ln3jD = load i64*, i64** %Sp_Var - %ln3jE = load i64, i64* %R1_Var - %ln3jF = load i64, i64* %R2_Var - %ln3jG = load i64, i64* %R3_Var - %ln3jH = load i64, i64* %R4_Var - tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3jC( i64* %Base_Arg, i64* %ln3jD, i64* %Hp_Arg, i64 %ln3jE, i64 %ln3jF, i64 %ln3jG, i64 %ln3jH, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + %ln3pK = call ccc i8* (i8*, i8*) %ln3pJ( i8* %ln3pG, i8* %ln3pI ) nounwind + %ln3pL = ptrtoint i8* %ln3pK to i64 + store i64 %ln3pL, i64* %lc3pe + %ln3pM = load i64, i64* %lc3pe + %ln3pN = icmp eq i64 %ln3pM, 0 + br i1 %ln3pN, label %c3pg, label %c3pf +c3pf: + %ln3pP = ptrtoint i8* @stg_bh_upd_frame_info to i64 + %ln3pO = load i64*, i64** %Sp_Var + %ln3pQ = getelementptr inbounds i64, i64* %ln3pO, i32 -2 + store i64 %ln3pP, i64* %ln3pQ, !tbaa !2 + %ln3pS = load i64, i64* %lc3pe + %ln3pR = load i64*, i64** %Sp_Var + %ln3pT = getelementptr inbounds i64, i64* %ln3pR, i32 -1 + store i64 %ln3pS, i64* %ln3pT, !tbaa !2 + %ln3pV = ptrtoint void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3ph_info$def to i64 + %ln3pU = load i64*, i64** %Sp_Var + %ln3pW = getelementptr inbounds i64, i64* %ln3pU, i32 -3 + store i64 %ln3pV, i64* %ln3pW, !tbaa !2 + store i64 100000, i64* %R3_Var + store i64 1, i64* %R2_Var + %ln3pX = load i64*, i64** %Sp_Var + %ln3pY = getelementptr inbounds i64, i64* %ln3pX, i32 -3 + %ln3pZ = ptrtoint i64* %ln3pY to i64 + %ln3q0 = inttoptr i64 %ln3pZ to i64* + store i64* %ln3q0, i64** %Sp_Var + %ln3q1 = bitcast void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_zdwupto_info$def to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3q2 = load i64*, i64** %Sp_Var + %ln3q3 = load i64, i64* %R1_Var + %ln3q4 = load i64, i64* %R2_Var + %ln3q5 = load i64, i64* %R3_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3q1( i64* %Base_Arg, i64* %ln3q2, i64* %Hp_Arg, i64 %ln3q3, i64 %ln3q4, i64 %ln3q5, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind ret void -c3iV: - %ln3jJ = load i64, i64* %R1_Var - %ln3jK = inttoptr i64 %ln3jJ to i64* - %ln3jL = load i64, i64* %ln3jK, !tbaa !4 - %ln3jM = inttoptr i64 %ln3jL to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* - %ln3jN = load i64*, i64** %Sp_Var - %ln3jO = load i64, i64* %R1_Var - tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3jM( i64* %Base_Arg, i64* %ln3jN, i64* %Hp_Arg, i64 %ln3jO, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind +c3pg: + %ln3q7 = load i64, i64* %R1_Var + %ln3q8 = inttoptr i64 %ln3q7 to i64* + %ln3q9 = load i64, i64* %ln3q8, !tbaa !4 + %ln3qa = inttoptr i64 %ln3q9 to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3qb = load i64*, i64** %Sp_Var + %ln3qc = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3qa( i64* %Base_Arg, i64* %ln3qb, i64* %Hp_Arg, i64 %ln3qc, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind ret void -c3j4: - %ln3jP = load i64, i64* %R1_Var - store i64 %ln3jP, i64* %R1_Var - %ln3jQ = getelementptr inbounds i64, i64* %Base_Arg, i32 -2 - %ln3jR = bitcast i64* %ln3jQ to i64* - %ln3jS = load i64, i64* %ln3jR, !tbaa !5 - %ln3jT = inttoptr i64 %ln3jS to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* - %ln3jU = load i64*, i64** %Sp_Var - %ln3jV = load i64, i64* %R1_Var - tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3jT( i64* %Base_Arg, i64* %ln3jU, i64* %Hp_Arg, i64 %ln3jV, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind +c3pt: + %ln3qd = load i64, i64* %R1_Var + store i64 %ln3qd, i64* %R1_Var + %ln3qe = getelementptr inbounds i64, i64* %Base_Arg, i32 -2 + %ln3qf = bitcast i64* %ln3qe to i64* + %ln3qg = load i64, i64* %ln3qf, !tbaa !5 + %ln3qh = inttoptr i64 %ln3qg to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3qi = load i64*, i64** %Sp_Var + %ln3qj = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3qh( i64* %Base_Arg, i64* %ln3qi, i64* %Hp_Arg, i64 %ln3qj, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind ret void } -declare ccc i1 @llvm.expect.i1(i1, i1) -; ==================== LLVM Code ==================== -@c3iW_info = internal alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3iW_info$def to i8*) -define internal ghccc void @c3iW_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 0, i64 30}> +;;;; LLVM Code ;;;; +@c3ph_info = internal alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3ph_info$def to i8*) +define internal ghccc void @c3ph_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 0, i64 30}> { -c3iW: +c3ph: + %R2_Var = alloca i64, i32 1 + store i64 undef, i64* %R2_Var + %ln3qk = ptrtoint void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3pm_info$def to i64 + %ln3ql = getelementptr inbounds i64, i64* %Sp_Arg, i32 0 + store i64 %ln3qk, i64* %ln3ql, !tbaa !2 + store i64 %R1_Arg, i64* %R2_Var + %ln3qm = bitcast void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_zdwsum_info$def to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3qn = load i64, i64* %R2_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3qm( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %R1_Arg, i64 %ln3qn, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +} + + + +;;;; LLVM Code ;;;; +@c3pm_info = internal alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3pm_info$def to i8*) +define internal ghccc void @c3pm_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 0, i64 30}> +{ +c3pm: %R4_Var = alloca i64, i32 1 store i64 undef, i64* %R4_Var %R3_Var = alloca i64, i32 1 store i64 undef, i64* %R3_Var %R2_Var = alloca i64, i32 1 store i64 undef, i64* %R2_Var - %ln3jW = ptrtoint void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3j1_info$def to i64 - %ln3jX = getelementptr inbounds i64, i64* %Sp_Arg, i32 0 - store i64 %ln3jW, i64* %ln3jX, !tbaa !2 - %ln3jY = ptrtoint i8* @ghczmprim_GHCziTypes_ZMZN_closure to i64 - %ln3jZ = add i64 %ln3jY, 1 - store i64 %ln3jZ, i64* %R4_Var + %ln3qo = ptrtoint void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3pq_info$def to i64 + %ln3qp = getelementptr inbounds i64, i64* %Sp_Arg, i32 0 + store i64 %ln3qo, i64* %ln3qp, !tbaa !2 + %ln3qq = ptrtoint i8* @ghczmprim_GHCziTypes_ZMZN_closure to i64 + %ln3qr = add i64 %ln3qq, 1 + store i64 %ln3qr, i64* %R4_Var store i64 %R1_Arg, i64* %R3_Var store i64 0, i64* %R2_Var - %ln3k0 = bitcast i8* @base_GHCziShow_zdwshowSignedInt_info to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* - %ln3k1 = load i64, i64* %R2_Var - %ln3k2 = load i64, i64* %R3_Var - %ln3k3 = load i64, i64* %R4_Var - tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3k0( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %R1_Arg, i64 %ln3k1, i64 %ln3k2, i64 %ln3k3, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + %ln3qs = bitcast i8* @base_GHCziShow_zdwshowSignedInt_info to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3qt = load i64, i64* %R2_Var + %ln3qu = load i64, i64* %R3_Var + %ln3qv = load i64, i64* %R4_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3qs( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %R1_Arg, i64 %ln3qt, i64 %ln3qu, i64 %ln3qv, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind ret void } -; ==================== LLVM Code ==================== -@c3j1_info = internal alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3j1_info$def to i8*) -define internal ghccc void @c3j1_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 0, i64 30}> +;;;; LLVM Code ;;;; +@c3pq_info = internal alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @c3pq_info$def to i8*) +define internal ghccc void @c3pq_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64}><{i64 0, i64 30}> { -c3j1: +c3pq: %Hp_Var = alloca i64*, i32 1 store i64* %Hp_Arg, i64** %Hp_Var %R1_Var = alloca i64, i32 1 @@ -309,138 +775,289 @@ c3j1: store i64* %Sp_Arg, i64** %Sp_Var %R2_Var = alloca i64, i32 1 store i64 %R2_Arg, i64* %R2_Var - %ln3k4 = load i64*, i64** %Hp_Var - %ln3k5 = getelementptr inbounds i64, i64* %ln3k4, i32 3 - %ln3k6 = ptrtoint i64* %ln3k5 to i64 - %ln3k7 = inttoptr i64 %ln3k6 to i64* - store i64* %ln3k7, i64** %Hp_Var - %ln3k8 = load i64*, i64** %Hp_Var - %ln3k9 = ptrtoint i64* %ln3k8 to i64 - %ln3ka = getelementptr inbounds i64, i64* %Base_Arg, i32 107 - %ln3kb = bitcast i64* %ln3ka to i64* - %ln3kc = load i64, i64* %ln3kb, !tbaa !5 - %ln3kd = icmp ugt i64 %ln3k9, %ln3kc - %ln3ke = call ccc i1 (i1, i1) @llvm.expect.i1( i1 %ln3kd, i1 0 ) - br i1 %ln3ke, label %c3j9, label %c3j8 -c3j8: - %ln3kg = ptrtoint i8* @ghczmprim_GHCziTypes_ZC_con_info to i64 - %ln3kf = load i64*, i64** %Hp_Var - %ln3kh = getelementptr inbounds i64, i64* %ln3kf, i32 -2 - store i64 %ln3kg, i64* %ln3kh, !tbaa !3 - %ln3kj = load i64, i64* %R1_Var - %ln3ki = load i64*, i64** %Hp_Var - %ln3kk = getelementptr inbounds i64, i64* %ln3ki, i32 -1 - store i64 %ln3kj, i64* %ln3kk, !tbaa !3 - %ln3km = load i64, i64* %R2_Var - %ln3kl = load i64*, i64** %Hp_Var - %ln3kn = getelementptr inbounds i64, i64* %ln3kl, i32 0 - store i64 %ln3km, i64* %ln3kn, !tbaa !3 - %ln3kp = load i64*, i64** %Hp_Var - %ln3kq = ptrtoint i64* %ln3kp to i64 - %ln3kr = add i64 %ln3kq, -14 - store i64 %ln3kr, i64* %R1_Var - %ln3ks = load i64*, i64** %Sp_Var - %ln3kt = getelementptr inbounds i64, i64* %ln3ks, i32 1 - %ln3ku = ptrtoint i64* %ln3kt to i64 - %ln3kv = inttoptr i64 %ln3ku to i64* - store i64* %ln3kv, i64** %Sp_Var - %ln3kw = load i64*, i64** %Sp_Var - %ln3kx = getelementptr inbounds i64, i64* %ln3kw, i32 0 - %ln3ky = bitcast i64* %ln3kx to i64* - %ln3kz = load i64, i64* %ln3ky, !tbaa !2 - %ln3kA = inttoptr i64 %ln3kz to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* - %ln3kB = load i64*, i64** %Sp_Var - %ln3kC = load i64*, i64** %Hp_Var - %ln3kD = load i64, i64* %R1_Var - tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3kA( i64* %Base_Arg, i64* %ln3kB, i64* %ln3kC, i64 %ln3kD, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + %ln3qw = load i64*, i64** %Hp_Var + %ln3qx = getelementptr inbounds i64, i64* %ln3qw, i32 3 + %ln3qy = ptrtoint i64* %ln3qx to i64 + %ln3qz = inttoptr i64 %ln3qy to i64* + store i64* %ln3qz, i64** %Hp_Var + %ln3qA = load i64*, i64** %Hp_Var + %ln3qB = ptrtoint i64* %ln3qA to i64 + %ln3qC = getelementptr inbounds i64, i64* %Base_Arg, i32 107 + %ln3qD = bitcast i64* %ln3qC to i64* + %ln3qE = load i64, i64* %ln3qD, !tbaa !5 + %ln3qF = icmp ugt i64 %ln3qB, %ln3qE + %ln3qG = call ccc i1 (i1, i1) @llvm.expect.i1( i1 %ln3qF, i1 0 ) + br i1 %ln3qG, label %c3pz, label %c3py +c3py: + %ln3qI = ptrtoint i8* @ghczmprim_GHCziTypes_ZC_con_info to i64 + %ln3qH = load i64*, i64** %Hp_Var + %ln3qJ = getelementptr inbounds i64, i64* %ln3qH, i32 -2 + store i64 %ln3qI, i64* %ln3qJ, !tbaa !3 + %ln3qL = load i64, i64* %R1_Var + %ln3qK = load i64*, i64** %Hp_Var + %ln3qM = getelementptr inbounds i64, i64* %ln3qK, i32 -1 + store i64 %ln3qL, i64* %ln3qM, !tbaa !3 + %ln3qO = load i64, i64* %R2_Var + %ln3qN = load i64*, i64** %Hp_Var + %ln3qP = getelementptr inbounds i64, i64* %ln3qN, i32 0 + store i64 %ln3qO, i64* %ln3qP, !tbaa !3 + %ln3qR = load i64*, i64** %Hp_Var + %ln3qS = ptrtoint i64* %ln3qR to i64 + %ln3qT = add i64 %ln3qS, -14 + store i64 %ln3qT, i64* %R1_Var + %ln3qU = load i64*, i64** %Sp_Var + %ln3qV = getelementptr inbounds i64, i64* %ln3qU, i32 1 + %ln3qW = ptrtoint i64* %ln3qV to i64 + %ln3qX = inttoptr i64 %ln3qW to i64* + store i64* %ln3qX, i64** %Sp_Var + %ln3qY = load i64*, i64** %Sp_Var + %ln3qZ = getelementptr inbounds i64, i64* %ln3qY, i32 0 + %ln3r0 = bitcast i64* %ln3qZ to i64* + %ln3r1 = load i64, i64* %ln3r0, !tbaa !2 + %ln3r2 = inttoptr i64 %ln3r1 to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3r3 = load i64*, i64** %Sp_Var + %ln3r4 = load i64*, i64** %Hp_Var + %ln3r5 = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3r2( i64* %Base_Arg, i64* %ln3r3, i64* %ln3r4, i64 %ln3r5, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind ret void -c3j9: - %ln3kE = getelementptr inbounds i64, i64* %Base_Arg, i32 113 - store i64 24, i64* %ln3kE, !tbaa !5 - %ln3kF = load i64, i64* %R2_Var - store i64 %ln3kF, i64* %R2_Var - %ln3kG = load i64, i64* %R1_Var - store i64 %ln3kG, i64* %R1_Var - %ln3kH = bitcast i8* @stg_gc_pp to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* - %ln3kI = load i64*, i64** %Sp_Var - %ln3kJ = load i64*, i64** %Hp_Var - %ln3kK = load i64, i64* %R1_Var - %ln3kL = load i64, i64* %R2_Var - tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3kH( i64* %Base_Arg, i64* %ln3kI, i64* %ln3kJ, i64 %ln3kK, i64 %ln3kL, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind +c3pz: + %ln3r6 = getelementptr inbounds i64, i64* %Base_Arg, i32 113 + store i64 24, i64* %ln3r6, !tbaa !5 + %ln3r7 = load i64, i64* %R2_Var + store i64 %ln3r7, i64* %R2_Var + %ln3r8 = load i64, i64* %R1_Var + store i64 %ln3r8, i64* %R1_Var + %ln3r9 = bitcast i8* @stg_gc_pp to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3ra = load i64*, i64** %Sp_Var + %ln3rb = load i64*, i64** %Hp_Var + %ln3rc = load i64, i64* %R1_Var + %ln3rd = load i64, i64* %R2_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3r9( i64* %Base_Arg, i64* %ln3ra, i64* %ln3rb, i64 %ln3rc, i64 %ln3rd, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind ret void } -; ==================== LLVM Code ==================== -%Sum_hszusumzupure1_closure_struct = type <{i64, i64}> -@Sum_hszusumzupure1_closure$def = internal global %Sum_hszusumzupure1_closure_struct<{i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_hszusumzupure1_info$def to i64), i64 0}> -@Sum_hszusumzupure1_closure = alias i8, bitcast (%Sum_hszusumzupure1_closure_struct* @Sum_hszusumzupure1_closure$def to i8*) +;;;; LLVM Code ;;;; +%SumSimpleBasic_hszusumzupure1_closure_struct = type <{i64, i64}> +@SumSimpleBasic_hszusumzupure1_closure$def = internal global %SumSimpleBasic_hszusumzupure1_closure_struct<{i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_hszusumzupure1_info$def to i64), i64 0}> +@SumSimpleBasic_hszusumzupure1_closure = alias i8, bitcast (%SumSimpleBasic_hszusumzupure1_closure_struct* @SumSimpleBasic_hszusumzupure1_closure$def to i8*) -; ==================== LLVM Code ==================== -@Sum_hszusumzupure1_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_hszusumzupure1_info$def to i8*) -define ghccc void @Sum_hszusumzupure1_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64, i64, i64}><{i64 add (i64 sub (i64 ptrtoint (i8* @S3kT_srt to i64),i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_hszusumzupure1_info$def to i64)),i64 0), i64 4294967299, i64 0, i64 30064771086}> +;;;; LLVM Code ;;;; +@SumSimpleBasic_hszusumzupure1_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_hszusumzupure1_info$def to i8*) +define ghccc void @SumSimpleBasic_hszusumzupure1_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64, i64, i64}><{i64 add (i64 sub (i64 ptrtoint (i8* @S3rl_srt to i64),i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_hszusumzupure1_info$def to i64)),i64 0), i64 4294967299, i64 0, i64 30064771086}> { -c3kQ: +c3ri: %R4_Var = alloca i64, i32 1 store i64 undef, i64* %R4_Var %R3_Var = alloca i64, i32 1 store i64 undef, i64* %R3_Var %R2_Var = alloca i64, i32 1 store i64 undef, i64* %R2_Var - %ln3kU = ptrtoint i8* @ghczmprim_GHCziTypes_True_closure to i64 - %ln3kV = add i64 %ln3kU, 2 - store i64 %ln3kV, i64* %R4_Var - %ln3kW = ptrtoint %Sum_hszusumzupure2_closure_struct* @Sum_hszusumzupure2_closure$def to i64 - store i64 %ln3kW, i64* %R3_Var - %ln3kX = ptrtoint i8* @base_GHCziIOziHandleziFD_stdout_closure to i64 - store i64 %ln3kX, i64* %R2_Var - %ln3kY = bitcast i8* @base_GHCziIOziHandleziText_hPutStr2_info to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* - %ln3kZ = load i64, i64* %R2_Var - %ln3l0 = load i64, i64* %R3_Var - %ln3l1 = load i64, i64* %R4_Var - tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3kY( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %R1_Arg, i64 %ln3kZ, i64 %ln3l0, i64 %ln3l1, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + %ln3rm = ptrtoint i8* @ghczmprim_GHCziTypes_True_closure to i64 + %ln3rn = add i64 %ln3rm, 2 + store i64 %ln3rn, i64* %R4_Var + %ln3ro = ptrtoint %SumSimpleBasic_hszusumzupure2_closure_struct* @SumSimpleBasic_hszusumzupure2_closure$def to i64 + store i64 %ln3ro, i64* %R3_Var + %ln3rp = ptrtoint i8* @base_GHCziIOziHandleziFD_stdout_closure to i64 + store i64 %ln3rp, i64* %R2_Var + %ln3rq = bitcast i8* @base_GHCziIOziHandleziText_hPutStr2_info to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3rr = load i64, i64* %R2_Var + %ln3rs = load i64, i64* %R3_Var + %ln3rt = load i64, i64* %R4_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3rq( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %R1_Arg, i64 %ln3rr, i64 %ln3rs, i64 %ln3rt, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind ret void } -; ==================== LLVM Code ==================== -%Sum_hszusumzupure_closure_struct = type <{i64, i64}> -@Sum_hszusumzupure_closure$def = internal global %Sum_hszusumzupure_closure_struct<{i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_hszusumzupure_info$def to i64), i64 0}> -@Sum_hszusumzupure_closure = alias i8, bitcast (%Sum_hszusumzupure_closure_struct* @Sum_hszusumzupure_closure$def to i8*) +;;;; LLVM Code ;;;; +%SumSimpleBasic_hszusumzupure_closure_struct = type <{i64, i64}> +@SumSimpleBasic_hszusumzupure_closure$def = internal global %SumSimpleBasic_hszusumzupure_closure_struct<{i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_hszusumzupure_info$def to i64), i64 0}> +@SumSimpleBasic_hszusumzupure_closure = alias i8, bitcast (%SumSimpleBasic_hszusumzupure_closure_struct* @SumSimpleBasic_hszusumzupure_closure$def to i8*) -; ==================== LLVM Code ==================== -@Sum_hszusumzupure_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_hszusumzupure_info$def to i8*) -define ghccc void @Sum_hszusumzupure_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64, i64, i64}><{i64 add (i64 sub (i64 ptrtoint (i8* @S3kT_srt to i64),i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_hszusumzupure_info$def to i64)),i64 24), i64 4294967299, i64 0, i64 4294967310}> +;;;; LLVM Code ;;;; +@SumSimpleBasic_hszusumzupure_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_hszusumzupure_info$def to i8*) +define ghccc void @SumSimpleBasic_hszusumzupure_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64, i64, i64}><{i64 add (i64 sub (i64 ptrtoint (i8* @S3rl_srt to i64),i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_hszusumzupure_info$def to i64)),i64 24), i64 4294967299, i64 0, i64 4294967310}> { -c3l6: - %ln3l9 = bitcast void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @Sum_hszusumzupure1_info$def to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* - tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3l9( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %R1_Arg, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind +c3ry: + %ln3rB = bitcast void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_hszusumzupure1_info$def to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3rB( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %R1_Arg, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind ret void } -; ==================== LLVM Code ==================== -%S3kT_srt_struct = type <{i64, i64, i64, i64}> -@S3kT_srt$def = internal constant %S3kT_srt_struct<{i64 ptrtoint (i8* @base_GHCziIOziHandleziFD_stdout_closure to i64), i64 ptrtoint (i8* @base_GHCziIOziHandleziText_hPutStr2_closure to i64), i64 ptrtoint (%Sum_hszusumzupure2_closure_struct* @Sum_hszusumzupure2_closure$def to i64), i64 ptrtoint (%Sum_hszusumzupure1_closure_struct* @Sum_hszusumzupure1_closure$def to i64)}> -@S3kT_srt = internal alias i8, bitcast (%S3kT_srt_struct* @S3kT_srt$def to i8*) +;;;; LLVM Code ;;;; +%SumSimpleBasic_Nil_closure_struct = type <{i64}> +@SumSimpleBasic_Nil_closure$def = internal global %SumSimpleBasic_Nil_closure_struct<{i64 ptrtoint (i8* @SumSimpleBasic_Nil_con_info to i64)}> +@SumSimpleBasic_Nil_closure = alias i8, bitcast (%SumSimpleBasic_Nil_closure_struct* @SumSimpleBasic_Nil_closure$def to i8*) -; ==================== LLVM Code ==================== +;;;; LLVM Code ;;;; +%SumSimpleBasic_Cons_closure_struct = type <{i64}> +@SumSimpleBasic_Cons_closure$def = internal global %SumSimpleBasic_Cons_closure_struct<{i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_Cons_info$def to i64)}> +@SumSimpleBasic_Cons_closure = alias i8, bitcast (%SumSimpleBasic_Cons_closure_struct* @SumSimpleBasic_Cons_closure$def to i8*) + + + +;;;; LLVM Code ;;;; +@SumSimpleBasic_Cons_info = internal alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_Cons_info$def to i8*) +define internal ghccc void @SumSimpleBasic_Cons_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64, i64}><{i64 8589934607, i64 0, i64 14}> +{ +c3rH: + %Hp_Var = alloca i64*, i32 1 + store i64* %Hp_Arg, i64** %Hp_Var + %R1_Var = alloca i64, i32 1 + store i64 %R1_Arg, i64* %R1_Var + %R3_Var = alloca i64, i32 1 + store i64 %R3_Arg, i64* %R3_Var + %R2_Var = alloca i64, i32 1 + store i64 %R2_Arg, i64* %R2_Var + %ln3rM = load i64*, i64** %Hp_Var + %ln3rN = getelementptr inbounds i64, i64* %ln3rM, i32 3 + %ln3rO = ptrtoint i64* %ln3rN to i64 + %ln3rP = inttoptr i64 %ln3rO to i64* + store i64* %ln3rP, i64** %Hp_Var + %ln3rQ = load i64*, i64** %Hp_Var + %ln3rR = ptrtoint i64* %ln3rQ to i64 + %ln3rS = getelementptr inbounds i64, i64* %Base_Arg, i32 107 + %ln3rT = bitcast i64* %ln3rS to i64* + %ln3rU = load i64, i64* %ln3rT, !tbaa !5 + %ln3rV = icmp ugt i64 %ln3rR, %ln3rU + %ln3rW = call ccc i1 (i1, i1) @llvm.expect.i1( i1 %ln3rV, i1 0 ) + br i1 %ln3rW, label %c3rL, label %c3rK +c3rK: + %ln3rY = ptrtoint i8* @SumSimpleBasic_Cons_con_info to i64 + %ln3rX = load i64*, i64** %Hp_Var + %ln3rZ = getelementptr inbounds i64, i64* %ln3rX, i32 -2 + store i64 %ln3rY, i64* %ln3rZ, !tbaa !3 + %ln3s1 = load i64, i64* %R2_Var + %ln3s0 = load i64*, i64** %Hp_Var + %ln3s2 = getelementptr inbounds i64, i64* %ln3s0, i32 -1 + store i64 %ln3s1, i64* %ln3s2, !tbaa !3 + %ln3s4 = load i64, i64* %R3_Var + %ln3s3 = load i64*, i64** %Hp_Var + %ln3s5 = getelementptr inbounds i64, i64* %ln3s3, i32 0 + store i64 %ln3s4, i64* %ln3s5, !tbaa !3 + %ln3s7 = load i64*, i64** %Hp_Var + %ln3s8 = ptrtoint i64* %ln3s7 to i64 + %ln3s9 = add i64 %ln3s8, -14 + store i64 %ln3s9, i64* %R1_Var + %ln3sa = getelementptr inbounds i64, i64* %Sp_Arg, i32 0 + %ln3sb = bitcast i64* %ln3sa to i64* + %ln3sc = load i64, i64* %ln3sb, !tbaa !2 + %ln3sd = inttoptr i64 %ln3sc to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3se = load i64*, i64** %Hp_Var + %ln3sf = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3sd( i64* %Base_Arg, i64* %Sp_Arg, i64* %ln3se, i64 %ln3sf, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +c3rL: + %ln3sg = getelementptr inbounds i64, i64* %Base_Arg, i32 113 + store i64 24, i64* %ln3sg, !tbaa !5 + %ln3sh = load i64, i64* %R3_Var + store i64 %ln3sh, i64* %R3_Var + %ln3si = load i64, i64* %R2_Var + store i64 %ln3si, i64* %R2_Var + %ln3sj = ptrtoint %SumSimpleBasic_Cons_closure_struct* @SumSimpleBasic_Cons_closure$def to i64 + store i64 %ln3sj, i64* %R1_Var + %ln3sk = getelementptr inbounds i64, i64* %Base_Arg, i32 -1 + %ln3sl = bitcast i64* %ln3sk to i64* + %ln3sm = load i64, i64* %ln3sl, !tbaa !5 + %ln3sn = inttoptr i64 %ln3sm to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3so = load i64*, i64** %Hp_Var + %ln3sp = load i64, i64* %R1_Var + %ln3sq = load i64, i64* %R2_Var + %ln3sr = load i64, i64* %R3_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3sn( i64* %Base_Arg, i64* %Sp_Arg, i64* %ln3so, i64 %ln3sp, i64 %ln3sq, i64 %ln3sr, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +} + + + +;;;; LLVM Code ;;;; +%i3st_str_struct = type <{[24 x i8]}> +@i3st_str$def = internal constant %i3st_str_struct<{[24 x i8] [i8 109, i8 97, i8 105, i8 110, i8 58, i8 83, i8 117, i8 109, i8 83, i8 105, i8 109, i8 112, i8 108, i8 101, i8 66, i8 97, i8 115, i8 105, i8 99, i8 46, i8 78, i8 105, i8 108, i8 0]}>, align 1 +@i3st_str = internal alias i8, bitcast (%i3st_str_struct* @i3st_str$def to i8*) + + + +;;;; LLVM Code ;;;; +@SumSimpleBasic_Nil_con_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_Nil_con_info$def to i8*) +define ghccc void @SumSimpleBasic_Nil_con_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64, i64}><{i64 add (i64 sub (i64 ptrtoint (%i3st_str_struct* @i3st_str$def to i64),i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_Nil_con_info$def to i64)),i64 0), i64 4294967296, i64 3}> +{ +c3ss: + %R1_Var = alloca i64, i32 1 + store i64 %R1_Arg, i64* %R1_Var + %ln3sv = load i64, i64* %R1_Var + %ln3sw = add i64 %ln3sv, 1 + store i64 %ln3sw, i64* %R1_Var + %ln3sx = getelementptr inbounds i64, i64* %Sp_Arg, i32 0 + %ln3sy = bitcast i64* %ln3sx to i64* + %ln3sz = load i64, i64* %ln3sy, !tbaa !2 + %ln3sA = inttoptr i64 %ln3sz to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3sB = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3sA( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %ln3sB, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +} + + + +;;;; LLVM Code ;;;; +%i3sD_str_struct = type <{[25 x i8]}> +@i3sD_str$def = internal constant %i3sD_str_struct<{[25 x i8] [i8 109, i8 97, i8 105, i8 110, i8 58, i8 83, i8 117, i8 109, i8 83, i8 105, i8 109, i8 112, i8 108, i8 101, i8 66, i8 97, i8 115, i8 105, i8 99, i8 46, i8 67, i8 111, i8 110, i8 115, i8 0]}>, align 1 +@i3sD_str = internal alias i8, bitcast (%i3sD_str_struct* @i3sD_str$def to i8*) + + + +;;;; LLVM Code ;;;; +@SumSimpleBasic_Cons_con_info = alias i8, bitcast (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_Cons_con_info$def to i8*) +define ghccc void @SumSimpleBasic_Cons_con_info$def(i64* noalias nocapture %Base_Arg, i64* noalias nocapture %Sp_Arg, i64* noalias nocapture %Hp_Arg, i64 %R1_Arg, i64 %R2_Arg, i64 %R3_Arg, i64 %R4_Arg, i64 %R5_Arg, i64 %R6_Arg, i64 %SpLim_Arg) align 8 nounwind prefix <{i64, i64, i64}><{i64 add (i64 sub (i64 ptrtoint (%i3sD_str_struct* @i3sD_str$def to i64),i64 ptrtoint (void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* @SumSimpleBasic_Cons_con_info$def to i64)),i64 0), i64 2, i64 4294967300}> +{ +c3sC: + %R1_Var = alloca i64, i32 1 + store i64 %R1_Arg, i64* %R1_Var + %ln3sF = load i64, i64* %R1_Var + %ln3sG = add i64 %ln3sF, 2 + store i64 %ln3sG, i64* %R1_Var + %ln3sH = getelementptr inbounds i64, i64* %Sp_Arg, i32 0 + %ln3sI = bitcast i64* %ln3sH to i64* + %ln3sJ = load i64, i64* %ln3sI, !tbaa !2 + %ln3sK = inttoptr i64 %ln3sJ to void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64)* + %ln3sL = load i64, i64* %R1_Var + tail call ghccc void (i64*, i64*, i64*, i64, i64, i64, i64, i64, i64, i64) %ln3sK( i64* %Base_Arg, i64* %Sp_Arg, i64* %Hp_Arg, i64 %ln3sL, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 %SpLim_Arg ) nounwind + ret void +} + + + +;;;; LLVM Code ;;;; +%S3rl_srt_struct = type <{i64, i64, i64, i64}> +@S3rl_srt$def = internal constant %S3rl_srt_struct<{i64 ptrtoint (i8* @base_GHCziIOziHandleziFD_stdout_closure to i64), i64 ptrtoint (i8* @base_GHCziIOziHandleziText_hPutStr2_closure to i64), i64 ptrtoint (%SumSimpleBasic_hszusumzupure2_closure_struct* @SumSimpleBasic_hszusumzupure2_closure$def to i64), i64 ptrtoint (%SumSimpleBasic_hszusumzupure1_closure_struct* @SumSimpleBasic_hszusumzupure1_closure$def to i64)}> +@S3rl_srt = internal alias i8, bitcast (%S3rl_srt_struct* @S3rl_srt$def to i8*) + + + +;;;; LLVM Code ;;;; @ghczmprim_GHCziTypes_TrNameS_con_info = external global i8 @ghczmprim_GHCziTypes_Module_con_info = external global i8 +@ghczmprim_GHCziTypes_KindRepVar_con_info = external global i8 +@ghczmprim_GHCziTypes_TyCon_con_info = external global i8 +@ghczmprim_GHCziTypes_krepzdztArrzt_closure = external global i8 +@ghczmprim_GHCziTypes_ZC_con_info = external global i8 +@ghczmprim_GHCziTypes_ZMZN_closure = external global i8 +@ghczmprim_GHCziTypes_KindRepTyConApp_con_info = external global i8 +@ghczmprim_GHCziTypes_KindRepFun_con_info = external global i8 +@stg_upd_frame_info = external global i8 +@ghczmprim_GHCziTypes_Izh_con_info = external global i8 @newCAF = external global i8 @stg_bh_upd_frame_info = external global i8 -@ghczmprim_GHCziTypes_ZMZN_closure = external global i8 @base_GHCziShow_zdwshowSignedInt_info = external global i8 -@ghczmprim_GHCziTypes_ZC_con_info = external global i8 @stg_gc_pp = external global i8 @ghczmprim_GHCziTypes_True_closure = external global i8 @base_GHCziIOziHandleziFD_stdout_closure = external global i8 @@ -449,7 +1066,7 @@ c3l6: -; ==================== LLVM Code ==================== -@llvm.used = appending constant [10 x i8*] [i8* bitcast (%S3kT_srt_struct* @S3kT_srt$def to i8*), i8* bitcast (%Sum_hszusumzupure_closure_struct* @Sum_hszusumzupure_closure$def to i8*), i8* bitcast (%Sum_hszusumzupure1_closure_struct* @Sum_hszusumzupure1_closure$def to i8*), i8* bitcast (%Sum_hszusumzupure2_closure_struct* @Sum_hszusumzupure2_closure$def to i8*), i8* bitcast (%Sum_zdwsum_closure_struct* @Sum_zdwsum_closure$def to i8*), i8* bitcast (%Sum_zdtrModule_closure_struct* @Sum_zdtrModule_closure$def to i8*), i8* bitcast (%Sum_zdtrModule1_closure_struct* @Sum_zdtrModule1_closure$def to i8*), i8* bitcast (%Sum_zdtrModule2_bytes_struct* @Sum_zdtrModule2_bytes$def to i8*), i8* bitcast (%Sum_zdtrModule3_closure_struct* @Sum_zdtrModule3_closure$def to i8*), i8* bitcast (%Sum_zdtrModule4_bytes_struct* @Sum_zdtrModule4_bytes$def to i8*)], section "llvm.metadata" +;;;; LLVM Code ;;;; +@llvm.used = appending constant [29 x i8*] [i8* bitcast (%S3rl_srt_struct* @S3rl_srt$def to i8*), i8* bitcast (%i3sD_str_struct* @i3sD_str$def to i8*), i8* bitcast (%i3st_str_struct* @i3st_str$def to i8*), i8* bitcast (%SumSimpleBasic_Cons_closure_struct* @SumSimpleBasic_Cons_closure$def to i8*), i8* bitcast (%SumSimpleBasic_Nil_closure_struct* @SumSimpleBasic_Nil_closure$def to i8*), i8* bitcast (%SumSimpleBasic_hszusumzupure_closure_struct* @SumSimpleBasic_hszusumzupure_closure$def to i8*), i8* bitcast (%SumSimpleBasic_hszusumzupure1_closure_struct* @SumSimpleBasic_hszusumzupure1_closure$def to i8*), i8* bitcast (%SumSimpleBasic_hszusumzupure2_closure_struct* @SumSimpleBasic_hszusumzupure2_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdwupto_closure_struct* @SumSimpleBasic_zdwupto_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdwsum_closure_struct* @SumSimpleBasic_zdwsum_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtczqCons_closure_struct* @SumSimpleBasic_zdtczqCons_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtczqCons2_closure_struct* @SumSimpleBasic_zdtczqCons2_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtczqCons3_bytes_struct* @SumSimpleBasic_zdtczqCons3_bytes$def to i8*), i8* bitcast (%SumSimpleBasic_zdtczqCons1_closure_struct* @SumSimpleBasic_zdtczqCons1_closure$def to i8*), i8* bitcast (%r3kb_closure_struct* @r3kb_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtczqNil_closure_struct* @SumSimpleBasic_zdtczqNil_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtczqNil2_closure_struct* @SumSimpleBasic_zdtczqNil2_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtczqNil3_bytes_struct* @SumSimpleBasic_zdtczqNil3_bytes$def to i8*), i8* bitcast (%SumSimpleBasic_zdtczqNil1_closure_struct* @SumSimpleBasic_zdtczqNil1_closure$def to i8*), i8* bitcast (%r3ka_closure_struct* @r3ka_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtcList_closure_struct* @SumSimpleBasic_zdtcList_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtcList1_closure_struct* @SumSimpleBasic_zdtcList1_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtcList2_bytes_struct* @SumSimpleBasic_zdtcList2_bytes$def to i8*), i8* bitcast (%r3k9_closure_struct* @r3k9_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtrModule_closure_struct* @SumSimpleBasic_zdtrModule_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtrModule1_closure_struct* @SumSimpleBasic_zdtrModule1_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtrModule2_bytes_struct* @SumSimpleBasic_zdtrModule2_bytes$def to i8*), i8* bitcast (%SumSimpleBasic_zdtrModule3_closure_struct* @SumSimpleBasic_zdtrModule3_closure$def to i8*), i8* bitcast (%SumSimpleBasic_zdtrModule4_bytes_struct* @SumSimpleBasic_zdtrModule4_bytes$def to i8*)], section "llvm.metadata" diff --git a/playground/sum/sum-ghc-native-O2.asm b/playground/sum/sum-ghc-native-O2.asm new file mode 100644 index 00000000..410d32fe --- /dev/null +++ b/playground/sum/sum-ghc-native-O2.asm @@ -0,0 +1,672 @@ + +;;;; Asm code ;;;; +.section .rodata.str,"aMS",@progbits,1 +.align 1 +.align 1 +.globl SumSimpleBasic.$trModule4_bytes +.type SumSimpleBasic.$trModule4_bytes, @object +SumSimpleBasic.$trModule4_bytes: + .asciz "main" + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$trModule3_closure +.type SumSimpleBasic.$trModule3_closure, @object +SumSimpleBasic.$trModule3_closure: + .quad GHC.Types.TrNameS_con_info + .quad SumSimpleBasic.$trModule4_bytes + + + +;;;; Asm code ;;;; +.section .rodata.str,"aMS",@progbits,1 +.align 1 +.align 1 +.globl SumSimpleBasic.$trModule2_bytes +.type SumSimpleBasic.$trModule2_bytes, @object +SumSimpleBasic.$trModule2_bytes: + .asciz "SumSimpleBasic" + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$trModule1_closure +.type SumSimpleBasic.$trModule1_closure, @object +SumSimpleBasic.$trModule1_closure: + .quad GHC.Types.TrNameS_con_info + .quad SumSimpleBasic.$trModule2_bytes + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$trModule_closure +.type SumSimpleBasic.$trModule_closure, @object +SumSimpleBasic.$trModule_closure: + .quad GHC.Types.Module_con_info + .quad SumSimpleBasic.$trModule3_closure+1 + .quad SumSimpleBasic.$trModule1_closure+1 + .quad 3 + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +$krep_r3k9_closure: + .quad GHC.Types.KindRepVar_con_info + .quad 0 + + + +;;;; Asm code ;;;; +.section .rodata.str,"aMS",@progbits,1 +.align 1 +.align 1 +.globl SumSimpleBasic.$tcList2_bytes +.type SumSimpleBasic.$tcList2_bytes, @object +SumSimpleBasic.$tcList2_bytes: + .asciz "List" + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$tcList1_closure +.type SumSimpleBasic.$tcList1_closure, @object +SumSimpleBasic.$tcList1_closure: + .quad GHC.Types.TrNameS_con_info + .quad SumSimpleBasic.$tcList2_bytes + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$tcList_closure +.type SumSimpleBasic.$tcList_closure, @object +SumSimpleBasic.$tcList_closure: + .quad GHC.Types.TyCon_con_info + .quad SumSimpleBasic.$trModule_closure+1 + .quad SumSimpleBasic.$tcList1_closure+1 + .quad GHC.Types.krep$*Arr*_closure + .quad 8125128733883036046 + .quad 8522174167308563467 + .quad 0 + .quad 3 + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +$krep1_r3ka_closure: + .quad :_con_info + .quad $krep_r3k9_closure+2 + .quad GHC.Types.[]_closure+1 + .quad 3 + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$tc'Nil1_closure +.type SumSimpleBasic.$tc'Nil1_closure, @object +SumSimpleBasic.$tc'Nil1_closure: + .quad GHC.Types.KindRepTyConApp_con_info + .quad SumSimpleBasic.$tcList_closure+1 + .quad $krep1_r3ka_closure+2 + .quad 3 + + + +;;;; Asm code ;;;; +.section .rodata.str,"aMS",@progbits,1 +.align 1 +.align 1 +.globl SumSimpleBasic.$tc'Nil3_bytes +.type SumSimpleBasic.$tc'Nil3_bytes, @object +SumSimpleBasic.$tc'Nil3_bytes: + .asciz "'Nil" + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$tc'Nil2_closure +.type SumSimpleBasic.$tc'Nil2_closure, @object +SumSimpleBasic.$tc'Nil2_closure: + .quad GHC.Types.TrNameS_con_info + .quad SumSimpleBasic.$tc'Nil3_bytes + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$tc'Nil_closure +.type SumSimpleBasic.$tc'Nil_closure, @object +SumSimpleBasic.$tc'Nil_closure: + .quad GHC.Types.TyCon_con_info + .quad SumSimpleBasic.$trModule_closure+1 + .quad SumSimpleBasic.$tc'Nil2_closure+1 + .quad SumSimpleBasic.$tc'Nil1_closure+1 + .quad 3225848470370281545 + .quad 8987752080532592311 + .quad 1 + .quad 3 + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +$krep2_r3kb_closure: + .quad GHC.Types.KindRepFun_con_info + .quad SumSimpleBasic.$tc'Nil1_closure+1 + .quad SumSimpleBasic.$tc'Nil1_closure+1 + .quad 3 + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$tc'Cons1_closure +.type SumSimpleBasic.$tc'Cons1_closure, @object +SumSimpleBasic.$tc'Cons1_closure: + .quad GHC.Types.KindRepFun_con_info + .quad $krep_r3k9_closure+2 + .quad $krep2_r3kb_closure+4 + .quad 3 + + + +;;;; Asm code ;;;; +.section .rodata.str,"aMS",@progbits,1 +.align 1 +.align 1 +.globl SumSimpleBasic.$tc'Cons3_bytes +.type SumSimpleBasic.$tc'Cons3_bytes, @object +SumSimpleBasic.$tc'Cons3_bytes: + .asciz "'Cons" + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$tc'Cons2_closure +.type SumSimpleBasic.$tc'Cons2_closure, @object +SumSimpleBasic.$tc'Cons2_closure: + .quad GHC.Types.TrNameS_con_info + .quad SumSimpleBasic.$tc'Cons3_bytes + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$tc'Cons_closure +.type SumSimpleBasic.$tc'Cons_closure, @object +SumSimpleBasic.$tc'Cons_closure: + .quad GHC.Types.TyCon_con_info + .quad SumSimpleBasic.$trModule_closure+1 + .quad SumSimpleBasic.$tc'Cons2_closure+1 + .quad SumSimpleBasic.$tc'Cons1_closure+4 + .quad -7205385302398664762 + .quad 6836440343659544598 + .quad 1 + .quad 3 + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$wsum_closure +.type SumSimpleBasic.$wsum_closure, @object +SumSimpleBasic.$wsum_closure: + .quad SumSimpleBasic.$wsum_info + + + +;;;; Asm code ;;;; +.section .text +.align 8 +.align 8 + .quad 4294967301 + .quad 0 + .quad 14 +.globl SumSimpleBasic.$wsum_info +.type SumSimpleBasic.$wsum_info, @object +SumSimpleBasic.$wsum_info: +_c3kZ: + leaq -16(%rbp),%rax + cmpq %r15,%rax + jb _c3l0 +_c3l1: + movq $block_c3kS_info,-8(%rbp) + movq %r14,%rbx + addq $-8,%rbp + testb $7,%bl + jne _c3kS +_c3kT: + jmp *(%rbx) +.align 8 + .quad 65 + .quad 30 +block_c3lc_info: +_c3lc: + movq %rbx,%rax + movq 8(%rbp),%rbx + addq %rax,%rbx + addq $16,%rbp + jmp *(%rbp) +.align 8 + .quad 0 + .quad 30 +block_c3kS_info: +_c3kS: + movq %rbx,%rax + andl $7,%eax + cmpq $1,%rax + je _c3kW +_c3kX: + movq $block_c3l7_info,-8(%rbp) + movq 14(%rbx),%rax + movq 6(%rbx),%rbx + movq %rax,(%rbp) + addq $-8,%rbp + testb $7,%bl + jne _c3l7 +_c3l8: + jmp *(%rbx) +.align 8 + .quad 1 + .quad 30 +block_c3l7_info: +_c3l7: + movq $block_c3lc_info,(%rbp) + movq 8(%rbp),%r14 + movq 7(%rbx),%rax + movq %rax,8(%rbp) + jmp SumSimpleBasic.$wsum_info +_c3l0: + movl $SumSimpleBasic.$wsum_closure,%ebx + jmp *-8(%r13) +_c3kW: + xorl %ebx,%ebx + addq $8,%rbp + jmp *(%rbp) + .size SumSimpleBasic.$wsum_info, .-SumSimpleBasic.$wsum_info + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.$wupto_closure +.type SumSimpleBasic.$wupto_closure, @object +SumSimpleBasic.$wupto_closure: + .quad SumSimpleBasic.$wupto_info + + + +;;;; Asm code ;;;; +.section .text +.align 8 +.align 8 + .quad 8589934592 + .quad 20 +sat_s3kp_info: +_c3lF: + leaq -16(%rbp),%rax + cmpq %r15,%rax + jb _c3lG +_c3lH: + movq $stg_upd_frame_info,-16(%rbp) + movq %rbx,-8(%rbp) + movq 24(%rbx),%rsi + movq 16(%rbx),%rax + leaq 1(%rax),%r14 + addq $-16,%rbp + jmp SumSimpleBasic.$wupto_info +_c3lG: + jmp *-16(%r13) + .size sat_s3kp_info, .-sat_s3kp_info + + + +;;;; Asm code ;;;; +.section .text +.align 8 +.align 8 + .quad 8589934604 + .quad 0 + .quad 14 +.globl SumSimpleBasic.$wupto_info +.type SumSimpleBasic.$wupto_info, @object +SumSimpleBasic.$wupto_info: +_c3lL: + addq $72,%r12 + cmpq 856(%r13),%r12 + ja _c3lP +_c3lO: + cmpq %rsi,%r14 + jle _c3lJ +_c3lK: + addq $-72,%r12 + movl $SumSimpleBasic.Nil_closure+1,%ebx + jmp *(%rbp) +_c3lP: + movq $72,904(%r13) + movl $SumSimpleBasic.$wupto_closure,%ebx + jmp *-8(%r13) +_c3lJ: + movq $sat_s3kp_info,-64(%r12) + movq %r14,-48(%r12) + movq %rsi,-40(%r12) + movq $GHC.Types.I#_con_info,-32(%r12) + movq %r14,-24(%r12) + movq $SumSimpleBasic.Cons_con_info,-16(%r12) + leaq -31(%r12),%rax + movq %rax,-8(%r12) + leaq -64(%r12),%rax + movq %rax,(%r12) + leaq -14(%r12),%rbx + jmp *(%rbp) + .size SumSimpleBasic.$wupto_info, .-SumSimpleBasic.$wupto_info + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.hs_sum_pure2_closure +.type SumSimpleBasic.hs_sum_pure2_closure, @object +SumSimpleBasic.hs_sum_pure2_closure: + .quad SumSimpleBasic.hs_sum_pure2_info + .quad 0 + .quad 0 + .quad 0 + + + +;;;; Asm code ;;;; +.section .text +.align 8 +.align 8 + .quad 0 + .quad 21 +.globl SumSimpleBasic.hs_sum_pure2_info +.type SumSimpleBasic.hs_sum_pure2_info, @object +SumSimpleBasic.hs_sum_pure2_info: +_c3m9: + leaq -24(%rbp),%rax + cmpq %r15,%rax + jb _c3mj +_c3mk: + subq $8,%rsp + movq %r13,%rax + movq %rbx,%rsi + movq %rax,%rdi + xorl %eax,%eax + call newCAF + addq $8,%rsp + testq %rax,%rax + je _c3m6 +_c3m5: + movq $stg_bh_upd_frame_info,-16(%rbp) + movq %rax,-8(%rbp) + movq $block_c3m7_info,-24(%rbp) + movl $100000,%esi + movl $1,%r14d + addq $-24,%rbp + jmp SumSimpleBasic.$wupto_info +_c3mp: + movq $24,904(%r13) + jmp stg_gc_pp +.align 8 + .quad 0 + .quad 30 +block_c3mg_info: +_c3mg: + addq $24,%r12 + cmpq 856(%r13),%r12 + ja _c3mp +_c3mo: + movq $:_con_info,-16(%r12) + movq %rbx,-8(%r12) + movq %r14,(%r12) + leaq -14(%r12),%rbx + addq $8,%rbp + jmp *(%rbp) +_c3mj: + jmp *-16(%r13) +.align 8 + .quad 0 + .quad 30 +block_c3mc_info: +_c3mc: + movq $block_c3mg_info,(%rbp) + movl $GHC.Types.[]_closure+1,%edi + movq %rbx,%rsi + xorl %r14d,%r14d + jmp GHC.Show.$wshowSignedInt_info +.align 8 + .quad 0 + .quad 30 +block_c3m7_info: +_c3m7: + movq $block_c3mc_info,(%rbp) + movq %rbx,%r14 + jmp SumSimpleBasic.$wsum_info +_c3m6: + jmp *(%rbx) + .size SumSimpleBasic.hs_sum_pure2_info, .-SumSimpleBasic.hs_sum_pure2_info + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.hs_sum_pure1_closure +.type SumSimpleBasic.hs_sum_pure1_closure, @object +SumSimpleBasic.hs_sum_pure1_closure: + .quad SumSimpleBasic.hs_sum_pure1_info + .quad 0 + + + +;;;; Asm code ;;;; +.section .text +.align 8 +.align 8 + .long S3mC_srt-(SumSimpleBasic.hs_sum_pure1_info)+0 + .long 0 + .quad 4294967299 + .quad 0 + .quad 30064771086 +.globl SumSimpleBasic.hs_sum_pure1_info +.type SumSimpleBasic.hs_sum_pure1_info, @object +SumSimpleBasic.hs_sum_pure1_info: +_c3mz: + movl $GHC.Types.True_closure+2,%edi + movl $SumSimpleBasic.hs_sum_pure2_closure,%esi + movl $GHC.IO.Handle.FD.stdout_closure,%r14d + jmp GHC.IO.Handle.Text.hPutStr2_info + .size SumSimpleBasic.hs_sum_pure1_info, .-SumSimpleBasic.hs_sum_pure1_info + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.hs_sum_pure_closure +.type SumSimpleBasic.hs_sum_pure_closure, @object +SumSimpleBasic.hs_sum_pure_closure: + .quad SumSimpleBasic.hs_sum_pure_info + .quad 0 + + + +;;;; Asm code ;;;; +.section .text +.align 8 +.align 8 + .long S3mC_srt-(SumSimpleBasic.hs_sum_pure_info)+24 + .long 0 + .quad 4294967299 + .quad 0 + .quad 4294967310 +.globl SumSimpleBasic.hs_sum_pure_info +.type SumSimpleBasic.hs_sum_pure_info, @object +SumSimpleBasic.hs_sum_pure_info: +_c3mK: + jmp SumSimpleBasic.hs_sum_pure1_info + .size SumSimpleBasic.hs_sum_pure_info, .-SumSimpleBasic.hs_sum_pure_info + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.Nil_closure +.type SumSimpleBasic.Nil_closure, @object +SumSimpleBasic.Nil_closure: + .quad SumSimpleBasic.Nil_con_info + + + +;;;; Asm code ;;;; +.section .data +.align 8 +.align 1 +.globl SumSimpleBasic.Cons_closure +.type SumSimpleBasic.Cons_closure, @object +SumSimpleBasic.Cons_closure: + .quad SumSimpleBasic.Cons_info + + + +;;;; Asm code ;;;; +.section .text +.align 8 +.align 8 + .quad 8589934607 + .quad 0 + .quad 14 +SumSimpleBasic.Cons_info: +_c3mW: + addq $24,%r12 + cmpq 856(%r13),%r12 + ja _c3n0 +_c3mZ: + movq $SumSimpleBasic.Cons_con_info,-16(%r12) + movq %r14,-8(%r12) + movq %rsi,(%r12) + leaq -14(%r12),%rbx + jmp *(%rbp) +_c3n0: + movq $24,904(%r13) + movl $SumSimpleBasic.Cons_closure,%ebx + jmp *-8(%r13) + .size SumSimpleBasic.Cons_info, .-SumSimpleBasic.Cons_info + + + +;;;; Asm code ;;;; +.section .rodata.str,"aMS",@progbits,1 +.align 1 +.align 1 +i3n5_str: + .asciz "main:SumSimpleBasic.Nil" + + + +;;;; Asm code ;;;; +.section .text +.align 8 +.align 8 + .long i3n5_str-(SumSimpleBasic.Nil_con_info)+0 + .long 0 + .quad 4294967296 + .quad 3 +.globl SumSimpleBasic.Nil_con_info +.type SumSimpleBasic.Nil_con_info, @object +SumSimpleBasic.Nil_con_info: +_c3n4: + incq %rbx + jmp *(%rbp) + .size SumSimpleBasic.Nil_con_info, .-SumSimpleBasic.Nil_con_info + + + +;;;; Asm code ;;;; +.section .rodata.str,"aMS",@progbits,1 +.align 1 +.align 1 +i3na_str: + .asciz "main:SumSimpleBasic.Cons" + + + +;;;; Asm code ;;;; +.section .text +.align 8 +.align 8 + .long i3na_str-(SumSimpleBasic.Cons_con_info)+0 + .long 0 + .quad 2 + .quad 4294967300 +.globl SumSimpleBasic.Cons_con_info +.type SumSimpleBasic.Cons_con_info, @object +SumSimpleBasic.Cons_con_info: +_c3n9: + addq $2,%rbx + jmp *(%rbp) + .size SumSimpleBasic.Cons_con_info, .-SumSimpleBasic.Cons_con_info + + + +;;;; Asm code ;;;; +.section .data.rel.ro +.align 8 +.align 1 +S3mC_srt: + .quad GHC.IO.Handle.FD.stdout_closure + .quad GHC.IO.Handle.Text.hPutStr2_closure + .quad SumSimpleBasic.hs_sum_pure2_closure + .quad SumSimpleBasic.hs_sum_pure1_closure + + diff --git a/playground/sum/sum.asm b/playground/sum/sum.asm deleted file mode 100644 index 0f986c65..00000000 --- a/playground/sum/sum.asm +++ /dev/null @@ -1,267 +0,0 @@ -[1 of 1] Compiling Sum ( sum.hs, sum.o ) - -==================== Asm code ==================== -.section .data -.align 8 -.align 1 -.globl __stginit_main@main:Sum -.type __stginit_main@main:Sum, @object -__stginit_main@main:Sum: - - - -==================== Asm code ==================== -.section .rodata -.align 8 -.align 1 -c2qa_str: - .byte 109 - .byte 97 - .byte 105 - .byte 110 - .byte 0 - - - -==================== Asm code ==================== -.section .data -.align 8 -.align 1 -.globl Sum.$trModule2_closure -.type Sum.$trModule2_closure, @object -Sum.$trModule2_closure: - .quad GHC.Types.TrNameS_static_info - .quad c2qa_str - - - -==================== Asm code ==================== -.section .rodata -.align 8 -.align 1 -c2qe_str: - .byte 83 - .byte 117 - .byte 109 - .byte 0 - - - -==================== Asm code ==================== -.section .data -.align 8 -.align 1 -.globl Sum.$trModule1_closure -.type Sum.$trModule1_closure, @object -Sum.$trModule1_closure: - .quad GHC.Types.TrNameS_static_info - .quad c2qe_str - - - -==================== Asm code ==================== -.section .data -.align 8 -.align 1 -.globl Sum.$trModule_closure -.type Sum.$trModule_closure, @object -Sum.$trModule_closure: - .quad GHC.Types.Module_static_info - .quad Sum.$trModule2_closure+1 - .quad Sum.$trModule1_closure+1 - .quad 3 - - - -==================== Asm code ==================== -.section .data -.align 8 -.align 1 -.globl Sum.$wsum_closure -.type Sum.$wsum_closure, @object -Sum.$wsum_closure: - .quad Sum.$wsum_info - - - -==================== Asm code ==================== -.section .text -.align 8 -.align 8 - .quad 12884901904 - .quad 0 - .quad 15 -.globl Sum.$wsum_info -.type Sum.$wsum_info, @object -Sum.$wsum_info: -_c2qE: -_c2qz: - cmpq %rdi,%rsi - jg _c2qL -_c2qK: - addq %rsi,%r14 - incq %rsi - jmp _c2qz -_c2qL: - movq %r14,%rbx - jmp *(%rbp) - .size Sum.$wsum_info, .-Sum.$wsum_info - - - -==================== Asm code ==================== -.section .data -.align 8 -.align 1 -.globl Sum.hs_sum_pure2_closure -.type Sum.hs_sum_pure2_closure, @object -Sum.hs_sum_pure2_closure: - .quad Sum.hs_sum_pure2_info - .quad 0 - .quad 0 - .quad 0 - - - -==================== Asm code ==================== -.section .text -.align 8 -.align 8 - .quad 0 - .quad 22 -.globl Sum.hs_sum_pure2_info -.type Sum.hs_sum_pure2_info, @object -Sum.hs_sum_pure2_info: -_c2r7: - leaq -24(%rbp),%rax - cmpq %r15,%rax - jb _c2rd -_c2re: - subq $8,%rsp - movq %r13,%rax - movq %rbx,%rsi - movq %rax,%rdi - xorl %eax,%eax - call newCAF - addq $8,%rsp - testq %rax,%rax - je _c2r4 -_c2r3: - movq $stg_bh_upd_frame_info,-16(%rbp) - movq %rax,-8(%rbp) - movq $block_c2r5_info,-24(%rbp) - movl $100000,%edi - movl $1,%esi - xorl %r14d,%r14d - addq $-24,%rbp - jmp Sum.$wsum_info -_c2ri: - movq $24,904(%r13) - jmp stg_gc_pp -.align 8 - .quad 0 - .quad 32 -block_c2ra_info: -_c2ra: - addq $24,%r12 - cmpq 856(%r13),%r12 - ja _c2ri -_c2rh: - movq $:_con_info,-16(%r12) - movq %rbx,-8(%r12) - movq %r14,(%r12) - leaq -14(%r12),%rbx - addq $8,%rbp - jmp *(%rbp) -_c2rd: - jmp *-16(%r13) -.align 8 - .quad 0 - .quad 32 -block_c2r5_info: -_c2r5: - movq $block_c2ra_info,(%rbp) - movl $GHC.Types.[]_closure+1,%edi - movq %rbx,%rsi - xorl %r14d,%r14d - jmp GHC.Show.$wshowSignedInt_info -_c2r4: - jmp *(%rbx) - .size Sum.hs_sum_pure2_info, .-Sum.hs_sum_pure2_info - - - -==================== Asm code ==================== -.section .data -.align 8 -.align 1 -.globl Sum.hs_sum_pure1_closure -.type Sum.hs_sum_pure1_closure, @object -Sum.hs_sum_pure1_closure: - .quad Sum.hs_sum_pure1_info - .quad 0 - - - -==================== Asm code ==================== -.section .text -.align 8 -.align 8 - .long S2rw_srt-(Sum.hs_sum_pure1_info)+0 - .long 0 - .quad 4294967299 - .quad 0 - .quad 30064771087 -.globl Sum.hs_sum_pure1_info -.type Sum.hs_sum_pure1_info, @object -Sum.hs_sum_pure1_info: -_c2rt: - movl $GHC.Types.True_closure+2,%edi - movl $Sum.hs_sum_pure2_closure,%esi - movl $GHC.IO.Handle.FD.stdout_closure,%r14d - jmp GHC.IO.Handle.Text.hPutStr2_info - .size Sum.hs_sum_pure1_info, .-Sum.hs_sum_pure1_info - - - -==================== Asm code ==================== -.section .data -.align 8 -.align 1 -.globl Sum.hs_sum_pure_closure -.type Sum.hs_sum_pure_closure, @object -Sum.hs_sum_pure_closure: - .quad Sum.hs_sum_pure_info - .quad 0 - - - -==================== Asm code ==================== -.section .text -.align 8 -.align 8 - .long S2rw_srt-(Sum.hs_sum_pure_info)+24 - .long 0 - .quad 4294967299 - .quad 0 - .quad 4294967311 -.globl Sum.hs_sum_pure_info -.type Sum.hs_sum_pure_info, @object -Sum.hs_sum_pure_info: -_c2rF: - jmp Sum.hs_sum_pure1_info - .size Sum.hs_sum_pure_info, .-Sum.hs_sum_pure_info - - - -==================== Asm code ==================== -.section .data.rel.ro -.align 8 -.align 1 -S2rw_srt: - .quad GHC.IO.Handle.Text.hPutStr2_closure - .quad GHC.IO.Handle.FD.stdout_closure - .quad Sum.hs_sum_pure2_closure - .quad Sum.hs_sum_pure1_closure - - diff --git a/playground/sum/sum.hs b/playground/sum/sum.hs index 479c162d..a7aae4f9 100644 --- a/playground/sum/sum.hs +++ b/playground/sum/sum.hs @@ -1,9 +1,18 @@ -module Sum where +module SumSimpleBasic where + +data List a + = Nil + | Cons a (List a) hs_sum_pure :: IO () -hs_sum_pure = print $ sum 0 1 100000 +hs_sum_pure = print $ sum $ upto 1 100000 where - sum :: Int -> Int -> Int -> Int - sum n29 n30 n31 - | n30 > n31 = n29 - | otherwise = sum (n29 + n30) (n30 + 1) n31 + upto :: Int -> Int -> List Int + upto m n = if m > n + then Nil + else Cons m $ upto (m+1) n + + sum :: List Int -> Int + sum l = case l of + Nil -> 0 + Cons n ns -> n + sum ns