Bug ID: 38529
Summary: Alias analysis fails on aliased function arguments --
possibly resulting in incorrect code after scheduling
Severity: release blocker
Component: new bugs
Created attachment 20679
C program example
Attached in an example program (taken from the gcc test suite). Note that the
order fo the stores to pi and pl must happen in order because the argument to f
may alias, and in fact in this example they do. So the machine scheduler will
need a DAG edge from the store to pi to the store to pl.
To see the problem, we need a target that schedules with alias analysis
enabled. Arm64 cortex-53 is one example of this. So compile with:
clang --target=aarch64-arm-none-eabi -mcpu=cortex-a53 -O2 -S store-store.c
-mllvm -debug-only=isel -mllvm -view-misched-dags
I have attached the dot file for the function f that this generates. Note the
lack of an edge from between the STRX and the STRW. I have also attached the
result store-store.s. The code generated is clearly wrong. It performs the
stores in the wrong order and returns 1 instead of 0.
You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list