[llvm-bugs] [Bug 40940] New: clang crashing on __builtin_assume

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 3 08:44:53 PST 2019


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

            Bug ID: 40940
           Summary: clang crashing on __builtin_assume
           Product: new-bugs
           Version: 8.0
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: oiskuu at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 21556
  --> https://bugs.llvm.org/attachment.cgi?id=21556&action=edit
bugpoint reduction

Clang-8 crash somewhere along computeKnownBits.
Compile with -O -mssse3:

typedef char            __v16qi __attribute__((__vector_size__(16)));
typedef long long       __m128i __attribute__((__vector_size__(16)));
typedef long long       int64_t;

void expand_p6(__m128i *in, __m128i *out)
{
        *out = __builtin_ia32_pshufb128(*in, (__v16qi){ 0,1,2,3,4,5,-1,-1,
6,7,8,9,10,11,-1,-1 });
}

int64_t extract_p6(__m128i *in)
{
        union { __m128i m; int64_t i[2]; } t;

        expand_p6(in, &t.m);
        __builtin_assume(!(t.i[0] >> 48));
        return t.i[0];
}

-- 
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/20190303/66f1bf20/attachment-0001.html>


More information about the llvm-bugs mailing list