[llvm-bugs] [Bug 47751] New: Miscompile with opt -loop-vectorize
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 6 17:36:56 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47751
Bug ID: 47751
Summary: Miscompile with opt -loop-vectorize
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Keywords: miscompilation
Severity: normal
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: efriedma at quicinc.com
CC: ayal.zaks at intel.com, craig.topper at gmail.com,
david.green at arm.com, florian_hahn at apple.com,
llvm-bugs at lists.llvm.org
Created attachment 24028
--> https://bugs.llvm.org/attachment.cgi?id=24028&action=edit
Testcase
opt -loop-vectorize makes the attached testcase behave incorrectly.
The IR testcase is runnable: compile with llc, then run. If it's built
correctly, it should produce "3 1 2 4 5 6". After vectorization, it instead
produces "2 1 2 4 5 6".
I think the memcheck is getting emitted incorrectly? It looks like the
vectorized loop assumes the memory operations don't overlap. There is in fact
overlap at runtime; I guess the memcheck is supposed to detect that, but it
looks like that detection is failing somehow. At first glance, the check looks
like it's in the right form, but maybe something is going wrong in SCEV.
Not sure when this regressed, but it looks like it's been this way for at least
a year.
Not sure who to CC; has anyone looked at runtime checks recently?
--
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/20201007/204211e9/attachment.html>
More information about the llvm-bugs
mailing list