https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96108
Bug ID: 96108
Summary: Different behavior in DSE pass
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: 499537630 at qq dot com
Target Milestone: ---
There are different behavior in DSE pass between gcc10 and gcc7.3. BUT I do not
known the correctness of dse_classify_store.
In gcc7.3, we could get DSE_STORE_DEAD when we get DSE_STORE_MABEY_PARTIAL_DEAD
with gcc10.
$ cat tauth.c
struct aa;
static inline struct aa* get_aa(void) {
struct aa* a;
return a;
}
struct aa {
int b;
};
void test()
{
get_aa()->b &= 0xfff0;
}
$(7.3)aarch64_be-linux-gnu-gcc -S tauth.c -O2 -o -
.arch armv8-a
.file "tauth.c"
.text
.align 2
.p2align 3,,7
.global test
.type test, %function
test:
.LFB1:
.cfi_startproc
ret
.cfi_endproc
.LFE1:
.size test, .-test
.ident "GCC: 7.3.0"
.section.note.GNU-stack,"",@progbits
$(10.1)aarch64_be-linux-gnu-gcc -S tauth.c -O2 -o -
.arch armv8-a
.file "tauth.c"
.text
.align 2
.p2align 4,,11
.global test
.type test, %function
test:
.LFB1:
.cfi_startproc
mov x0, 0
ldr w1, [x0]
and w1, w1, 65520
str w1, [x0]
ret
.cfi_endproc
.LFE1:
.size test, .-test
.ident "GCC: 10.1.0"
.section.note.GNU-stack,"",@progbits