https://bugs.llvm.org/show_bug.cgi?id=43206

            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: unassignedb...@nondot.org
          Reporter: malts...@gmail.com
                CC: llvm-bugs@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...@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:
PASSED"

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

Reply via email to