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

            Bug ID: 22371
           Summary: invalid vectorization of fcmp oge and friends
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Trying llvm3.6rc1 with Numba, I get crashes on some vectorized code for ordered
comparisons.

For a loop running "fcmp oge" over an array of doubles, generated assembly
looks like this (x86-64):

    .align    8
.LCPI0_0:
    .quad    4607182418800017408
    .text
    .globl    "__main__.fn.float64.float64.array(float64,_1d,_C,_nonconst)"
    .align    16, 0x90
    .type   
"__main__.fn.float64.float64.array(float64,_1d,_C,_nonconst)",@function
"__main__.fn.float64.float64.array(float64,_1d,_C,_nonconst)":
    movq    32(%rdx), %r8
    testq    %r8, %r8
    jle    .LBB0_19
    movq    24(%rdx), %rcx
    cmplesd    %xmm0, %xmm1
    movabsq    $.LCPI0_0, %rax
    andpd    (%rax), %xmm1
        [snip]

The "andpd (%rax), %xmm1" crashes. AFAIU, that's because $.LCPI0_0 is not
16-byte aligned.

A quick look with gdb seems to confirm that hypothesis:

(gdb) info registers rax
rax            0x7ffff7fea058    140737354047576
(gdb) x/2 0x7ffff7fea058
0x7ffff7fea058:    0x00000000    0x3ff00000

-- 
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