<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 --- - 3.8 AArch64 support for half floats"
href="https://llvm.org/bugs/show_bug.cgi?id=26348">26348</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>3.8 AArch64 support for half floats
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>3.8
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>llc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>apazos@codeaurora.org
</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>Branch 3.7 had broken support for half floats. Since then there have been
several patches in mainline that improved it. But branch 3.8 seems to be
missing at least one of the latest fixes (what I could detect in my
validations).
For example the test below will crash in branch 3.8, but passes in the tip.
There is one commit that could be brought to branch 3.8 to resolve this crash I
suggest we pick it.
@258471 - Do not lower VSETCC if operand is an f16 vector
target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-none-linux-android"
@.str28 = external unnamed_addr constant [94 x i8], align 1
@.str29 = external unnamed_addr constant [84 x i8], align 1
; Function Attrs: nounwind
define i16 @test() {
%1 = call <4 x i16> @llvm.aarch64.neon.vcvtfp2hf(<4 x float> undef)
%2 = bitcast <4 x i16> %1 to <4 x half>
%3 = shufflevector <4 x half> %2, <4 x half> undef, <8 x i32> <i32 0, i32 1,
i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
%4 = fcmp une <8 x half> zeroinitializer, %3
%5 = sext <8 x i1> %4 to <8 x i16>
%6 = extractelement <8 x i16> %5, i64 undef
ret i16 %6
}
declare <4 x i16> @llvm.aarch64.neon.vcvtfp2hf(<4 x float>)
llc test.ll
llc:
/prj/llvm-arm/home/nightly/src/community-38/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:6693:
llvm::SDValue llvm::AArch64TargetLowering::LowerVSETCC(llvm::SDValue,
llvm::SelectionDAG &) const: Assertion
`LHS.getValueType().getVectorElementType() == MVT::f32 ||
LHS.getValueType().getVectorElementType() == MVT::f64' failed.
#0 0x00000000010c68d8 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0x10c68d8)
#1 0x00000000010c4de6 llvm::sys::RunSignalHandlers()
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0x10c4de6)
#2 0x00000000010c70f9 SignalHandler(int)
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0x10c70f9)
#3 0x00007fbbe6b24cb0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0xfcb0)
#4 0x00007fbbe5e670d5 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x360d5)
#5 0x00007fbbe5e6a83b abort (/lib/x86_64-linux-gnu/libc.so.6+0x3983b)
#6 0x00007fbbe5e5fd9e (/lib/x86_64-linux-gnu/libc.so.6+0x2ed9e)
#7 0x00007fbbe5e5fe42 (/lib/x86_64-linux-gnu/libc.so.6+0x2ee42)
#8 0x0000000000764545
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0x764545)
#9 0x000000000074052e llvm::AArch64TargetLowering::LowerSETCC(llvm::SDValue,
llvm::SelectionDAG&) const
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0x74052e)
#10 0x000000000073f54f
llvm::AArch64TargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&)
const
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0x73f54f)
#11 0x0000000000fc821f (anonymous
namespace)::VectorLegalizer::LegalizeOp(llvm::SDValue)
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0xfc821f)
#12 0x0000000000fc763d llvm::SelectionDAG::LegalizeVectors()
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0xfc763d)
#13 0x0000000000f7a2ec llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0xf7a2ec)
#14 0x0000000000f792e2
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0xf792e2)
#15 0x0000000000f769f7
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0xf769f7)
#16 0x0000000000a443bc
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0xa443bc)
#17 0x0000000000cfee2d llvm::FPPassManager::runOnFunction(llvm::Function&)
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0xcfee2d)
#18 0x0000000000cff07b llvm::FPPassManager::runOnModule(llvm::Module&)
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0xcff07b)
#19 0x0000000000cff622 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0xcff622)
#20 0x000000000054f5bf compileModule(char**, llvm::LLVMContext&)
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0x54f5bf)
#21 0x000000000054c6ab main
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0x54c6ab)
#22 0x00007fbbe5e5276d __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2176d)
#23 0x000000000054c4d9 _start
(/prj/llvm-arm/home/nightly/install/community-38/cross/2016-01-27/bin/llc+0x54c4d9)
Stack dump:
0. Program arguments: llc reduced.ll
1. Running pass 'Function Pass Manager' on module 'reduced.ll'.
2. Running pass 'AArch64 Instruction Selection' on function '@test'
Aborted (core dumped)</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>