-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Failed analysis of index dominance #80075
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I relabeled this as an enhancement proposal since to my understanding this isn't a bug. |
I filed corresponding gcc and llvm bugs: |
It looks like the new ConstraintElimination llvm pass should fix this. |
That went better than expected. LLVM devs often deliver. |
I confirmed that: .section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 7
.globl __ZN4test3foo17hbf89db3e2fd7b5fcE
.p2align 4, 0x90
__ZN4test3foo17hbf89db3e2fd7b5fcE:
.cfi_startproc
xorl %eax, %eax
cmpq %rdx, %rsi
jbe LBB0_3
cmpq %rdx, %rcx
ja LBB0_3
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movb (%rdi,%rcx), %al
popq %rbp
LBB0_3:
retq
.cfi_endproc |
You could also test issue #80620 :-) |
Is |
I would be surprised if it was, but it's probably worth adding. |
Fixed since @rustbot label +e-needs-test |
Uh oh!
There was an error while loading. Please reload this page.
rustc 1.50.0-nightly (f76ecd0 2020-12-15) on this code:
Can't remove the array bound test (compiling even with aggressive optimizations):
This shows that value range analysis could be useful.
Godbolt: https://rust.godbolt.org/z/jPoY6Mnx6
The text was updated successfully, but these errors were encountered: