cfallin edited issue #6301:
I would not expect
movq 16(%rbp), %rax
to be lifted up intoblock0
, as it is only used inblock1
and notblock2
. This results in a load that is not necessary for all possible executions.test compile precise-output target x86_64 function %foo(i32, i32, i32, i32, i32, i32, i32) -> i32 { block0(v0: i32, v1: i32, v2: i32, v3: i32, v4: i32, v5: i32, v6: i32): brif v0, block1, block2 block1: return v5 block2: return v6 } ; VCode: ; pushq %rbp ; movq %rsp, %rbp ; block0: ; movq %r9, %r11 ; movq 16(%rbp), %rax ; testl %edi, %edi ; jnz label2; j label1 ; block1: ; movq %rbp, %rsp ; popq %rbp ; ret ; block2: ; movq %r11, %rax ; movq %rbp, %rsp ; popq %rbp ; ret ; ; Disassembled: ; block0: ; offset 0x0 ; pushq %rbp ; movq %rsp, %rbp ; block1: ; offset 0x4 ; movq %r9, %r11 ; movq 0x10(%rbp), %rax ; testl %edi, %edi ; jne 0x18 ; block2: ; offset 0x13 ; movq %rbp, %rsp ; popq %rbp ; retq ; block3: ; offset 0x18 ; movq %r11, %rax ; movq %rbp, %rsp ; popq %rbp ; retq
Last updated: Nov 22 2024 at 16:03 UTC