[LLVMbugs] [Bug 20088] New: llc handles comparissons incorrectly, Linux, trunk, regression from version 3.4

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 20 03:49:41 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20088

            Bug ID: 20088
           Summary: llc handles comparissons incorrectly, Linux, trunk,
                    regression from version 3.4
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: unassignedbugs at nondot.org
          Reporter: ili.filippov at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12684
  --> http://llvm.org/bugs/attachment.cgi?id=12684&action=edit
Reproducer

In this test we assign a small values to an array and then compare them to
"100". All of them are less then 100, so we would like to have an array of "1"
as a result. But in trunk we have answer zeros.

To reproduce:

bin-3.4/bin/llc r1.ll -mattr=+avx
clang t.cpp  r1.s
./a.out 
1.000000
...

bin-trunk/bin/llc r1.ll -mattr=+avx
clang t.cpp  r1.s
./a.out 
0.000000
...

t.cpp:
#include <stdio.h>
extern "C" {
    extern void f_f(float *result, float *a);
}
int main(int argc, char *argv[]) {
    float returned_result[64];
    float vfloat[64];
    for (int i = 0; i < 64; ++i) {
        vfloat[i] = i+1;
    }
    f_f(returned_result, vfloat);
    for (int i = 0; i < 16; ++i) {
        printf("%f\n", returned_result[i]);
    }
    return 0;
}

r1.ll is attached.

llc from trunk and 3.4 version generates very different asm files, trunk asm
file is very small and without mention of value "100".

-- 
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/20140620/485fe32a/attachment.html>


More information about the llvm-bugs mailing list