[llvm-bugs] [Bug 47658] New: LoopReroll incorrectly reorders memory instrs when there is overlap
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Sep 27 03:35:23 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47658
Bug ID: 47658
Summary: LoopReroll incorrectly reorders memory instrs when
there is overlap
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: kevindevos9542 at gmail.com
CC: llvm-bugs at lists.llvm.org, nunoplopes at sapo.pt
Test: Transforms/LoopReroll/basic.ll
Function: pointer_bitcast_baseinst
Reason: Memory mismatch
Example: https://godbolt.org/z/5c8YK1
Ordering of loads and stores with memory offsets:
source - load 876, load 892, store 892, store 900, ...
target - load 876, store 892, load 892, store 900, ...
Since there is overlap between the memory positions of the second load and
first store in source then the swapped ordering of these instructions in target
is incorrect.
This optimization should not be performed in case of such a memory overlap.
A detailed and complete Alive report with single iteration loop unroll on this
test can be seen here: https://pastebin.com/pQsf61wb
--
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/20200927/4fa3fac0/attachment.html>
More information about the llvm-bugs
mailing list