https://bugs.llvm.org/show_bug.cgi?id=38529
Bug ID: 38529
Summary: Alias analysis fails on aliased function arguments --
possibly resulting in incorrect code after scheduling
Product: new-bugs
Version: 6.0
Hardware: Other
OS: All
Status: NEW
Severity: release blocker
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: ruttenb...@reservoir.com
CC: llvm-bugs@lists.llvm.org
Created attachment 20679
--> https://bugs.llvm.org/attachment.cgi?id=20679&action=edit
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
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs