[LLVMbugs] [Bug 23246] New: cannot select scalar_to_vector llvm.x86.mmx.punpckhbw

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 15 16:55:33 PDT 2015


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

            Bug ID: 23246
           Summary: cannot select scalar_to_vector llvm.x86.mmx.punpckhbw
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I think this broke between r234774 (known good) and r234879 (known bad).
Apologies for the odd testcase, this came out of delta and I couldn't make it
more sensible.

Testcase:

typedef long __m64 __attribute__((__vector_size__(8)));
typedef long __m128i __attribute__((__vector_size__(16)));
typedef char __v8qi __attribute__((__vector_size__(8)));
void consume(__m128i);
void test(__m64 __m1, __m64 __m2) {
  __m64 C = __builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
  __m64 q0;
  __m128i trans_tmp_3 = {(long)q0, (long)C};
  consume(trans_tmp_3);
}

$ clang -mavx b.cc -O2 -std=c++11
fatal error: error in backend: Cannot select: 0x2e8c290: v2i64 =
      scalar_to_vector 0x2e8c7e0 [ORD=9] [ID=14]
  0x2e8c7e0: x86mmx = llvm.x86.mmx.punpckhbw 0x2e8c6d0, 0x2e8c3a0, 0x2e8c5c0
[ORD=6] [ID=13]
    0x2e8c6d0: i64 = TargetConstant<3941> [ID=3]
    0x2e8c3a0: x86mmx = bitcast 0x2e8bf60 [ORD=3] [ID=11]
      0x2e8bf60: i64,ch = CopyFromReg 0x2e1a2c0, 0x2e8be50 [ORD=1] [ID=9]
        0x2e8be50: i64 = Register %vreg0 [ID=1]
    0x2e8c5c0: x86mmx = bitcast 0x2e8c180 [ORD=5] [ID=12]
      0x2e8c180: i64,ch = CopyFromReg 0x2e1a2c0, 0x2e8c070 [ORD=1] [ID=10]
        0x2e8c070: i64 = Register %vreg1 [ID=2]
In function: _Z4testDv1_lS_
clang: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
Target: x86_64-grtev4-linux-gnu

-- 
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/20150415/558693a6/attachment.html>


More information about the llvm-bugs mailing list