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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to