<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Attempt to use AVX2 intrinsic crashes clang on macOS X"
href="http://llvm.org/bugs/show_bug.cgi?id=22484">22484</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Attempt to use AVX2 intrinsic crashes clang on macOS X
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>gbuella@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=13815" name="attach_13815" title="C source file for reproducing the issue">attachment 13815</a> <a href="attachment.cgi?id=13815&action=edit" title="C source file for reproducing the issue">[details]</a></span>
C source file for reproducing the issue
The following code:
// compiler feature test used in a cmake makefile
#include <stdint.h>
typedef uint8_t vector32 __attribute__ ((vector_size (32)));
static const vector32 key32 = { 7, 6, 5, 4, 3, 2, 1, 0,
15, 14, 13, 12, 11, 10, 9, 8,
23, 22, 21, 20, 19, 18, 17, 16,
31, 30, 29, 28, 27, 26, 25, 24};
vector32 test_permute(vector32 v)
{
return __builtin_ia32_pshufb256(v, key32);
}
results in the following output:
fatal error: error in backend: Cannot select: 0x1028f7510: v32i8 =
X86ISD::PSHUFB 0x1028f3f10, 0x1028f4210 [ORD=2] [ID=10]
0x1028f3f10: v32i8,ch = CopyFromReg 0x10253b708, 0x1028f3e10 [ORD=1] [ID=6]
0x1028f3e10: v32i8 = Register %vreg0 [ID=1]
0x1028f4210: v32i8 = bitcast 0x1028f4110 [ORD=2] [ID=9]
0x1028f4110: v4i64,ch = load 0x10253b708, 0x1028f4310,
0x1028f7010<LD32[ConstantPool]> [ORD=2] [ID=8]
0x1028f4310: i64 = X86ISD::WrapperRIP 0x1028f7610 [ID=7]
0x1028f7610: i64 = TargetConstantPool<<32 x i8> <i8 7, i8 6, i8 5, i8
4, i8 3, i8 2, i8 1, i8 0, i8 15, i8 14, i8 13, i8 12, i8 11, i8 10, i8 9, i8
8, i8 23, i8 22, i8 21, i8 20, i8 19, i8 18, i8 17, i8 16, i8 31, i8 30, i8 29,
i8 28, i8 27, i8 26, i8 25, i8 24>> 0 [ID=5]
0x1028f7010: i64 = undef [ID=4]
In function: test_permute
clang: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://developer.apple.com/bugreporter/">http://developer.apple.com/bugreporter/</a> and include the crash backtrace,
preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/d8/m9xrbkrs2tj3x6xw_h0nmkn40000gn/T/vector32_test-594dbd.c
clang: note: diagnostic msg:
/var/folders/d8/m9xrbkrs2tj3x6xw_h0nmkn40000gn/T/vector32_test-594dbd.sh
clang: note: diagnostic msg:
********************
I'm not sure if this is only Apple specific, so I posted here. If it is, I can
send it to Apple.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>