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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to