<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 --- - Crash when using vector long long or vector double operator manipulation with altivec"
href="https://llvm.org/bugs/show_bug.cgi?id=31161">31161</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash when using vector long long or vector double operator manipulation with altivec
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>westion717@gmail.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>int main(){
vector long long a = {1,2};
vector long long b = {1,2};
vector double c = {1.1,2.1};
vector double d = {1.1,2.1};
if(a<b);
if(a>b);
if(a==b);
if(c<d);
if(c>d);
if(c==d);
}
it crashes.
As vector int and vector float work well. It should call related llvm builtins.
example.C
int main(){
vector int a = {1,2};
vector int b = {1,2};
vector float c = {1.1,2.1};
vector float d = {1.1,2.1};
if(a<b);
if(a>b);
if(a==b);
if(c<d);
if(c>d);
if(c==d);
}
cat example.ll | grep llvm.
%8 = call i32 @llvm.ppc.altivec.vcmpgtsw.p(i32 2, <4 x i32> %7, <4 x i32> %6)
%13 = call i32 @llvm.ppc.altivec.vcmpgtsw.p(i32 2, <4 x i32> %11, <4 x i32>
%12)
%18 = call i32 @llvm.ppc.altivec.vcmpequw.p(i32 2, <4 x i32> %16, <4 x i32>
%17)
%23 = call i32 @llvm.ppc.altivec.vcmpgtfp.p(i32 2, <4 x float> %22, <4 x
float> %21)
%28 = call i32 @llvm.ppc.altivec.vcmpgtfp.p(i32 2, <4 x float> %26, <4 x
float> %27)
%33 = call i32 @llvm.ppc.altivec.vcmpeqfp.p(i32 2, <4 x float> %31, <4 x
float> %32)
declare i32 @llvm.ppc.altivec.vcmpgtsw.p(i32, <4 x i32>, <4 x i32>) #1
declare i32 @llvm.ppc.altivec.vcmpequw.p(i32, <4 x i32>, <4 x i32>) #1
declare i32 @llvm.ppc.altivec.vcmpgtfp.p(i32, <4 x float>, <4 x float>) #1
declare i32 @llvm.ppc.altivec.vcmpeqfp.p(i32, <4 x float>, <4 x float>) #1</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>