[llvm-bugs] [Bug 38529] New: Alias analysis fails on aliased function arguments -- possibly resulting in incorrect code after scheduling
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Aug 11 08:52:40 PDT 2018
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: unassignedbugs at nondot.org
Reporter: ruttenberg at reservoir.com
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180811/f530a6b3/attachment.html>
More information about the llvm-bugs
mailing list