[llvm-bugs] [Bug 43206] New: Loop idiom recognizer miscompiles a memcmp loop

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 3 07:39:23 PDT 2019


            Bug ID: 43206
           Summary: Loop idiom recognizer miscompiles a memcmp loop
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: maltsevm at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22466
  --> https://bugs.llvm.org/attachment.cgi?id=22466&action=edit
Source code

After a recent commit

commit 5c9f3cfec78f9e9ae013de9a0d092a68e3e79e00
Author: Roman Lebedev <lebedev.ri at gmail.com>
Date:   Fri Aug 30 09:51:23 2019 +0000

    [LoopIdiomRecognize] BCmp loop idiom recognition

some of our internal tests started failing on AArch64 and ARM targets.

When the attached reproducer test.c is compiled with the following options:

clang -c -O3 --target=aarch64-arm-none-eabi -march=armv8-a+simd+fp+nocrypto
-std=c99 test.c -o test.o

then linked and run on a model it outputs: "RESULT: FAILED". The same code
compiled with the previous LLVM commit outputs the expected string "RESULT:

Bugpoint points to the loop-idiom pass. The attached bitcode demonstrates the
problem (it produces the correct output, but when run through 'opt
-loop-idiom', the output becomes incorrect).

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/20190903/cde136bd/attachment.html>

More information about the llvm-bugs mailing list