<html>
<head>
<base href="https://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 --- - instcombine triggers verifier error on atomic load/store types"
href="https://llvm.org/bugs/show_bug.cgi?id=29121">29121</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>instcombine triggers verifier error on atomic load/store types
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>3.9
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>stevenwu@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Testcase below:
$ cat test.ll
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
target triple = "arm64-apple-ios10.0.0"
define <2 x float> @no_atomic_vector_load(i8* %p) {
%retval = alloca <2 x float>, align 8
%1 = bitcast i8* %p to <2 x float>*
%2 = bitcast <2 x float>* %1 to i64*
%load = load atomic i64, i64* %2 unordered, align 8
%3 = bitcast <2 x float>* %retval to i64*
store i64 %load, i64* %3, align 8
%4 = load <2 x float>, <2 x float>* %retval, align 8
ret <2 x float> %4
}
define void @no_atomic_vector_store(<2 x float> %p, i8* %p2) {
%1 = bitcast <2 x float> %p to i64
%2 = bitcast i8* %p2 to i64*
store atomic i64 %1, i64* %2 unordered, align 8
ret void
}
$ opt -instcombine test.ll -o bad.bc
atomic load operand must have integer, pointer, or floating point type!
<2 x float> %load1 = load atomic <2 x float>, <2 x float>* %1 unordered,
align 8
LLVM ERROR: Broken function found, compilation aborted!
This is a legit verifier error because SelectionDAG cannot handle that:
$ opt -instcombine test.ll -o bad.bc -disable-verify
$ llc bad.bc -disable-verify
LLVM ERROR: Cannot select: t3: v2f32,ch = AtomicLoad<Volatile LD8[%1]> t0, t2
t2: i64,ch = CopyFromReg t0, Register:i64 %vreg0
t1: i64 = Register %vreg0
In function: no_atomic_vector_load</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>