<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Ah, sorry! You are using a clang-8 build, but I was lazy and quickly tried a trunk build. I can reproduce it yes with clang-8. <span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">FP16 in the ARM backend was
a bit of work-in-progress around that time, it had some rough edges, and you're hitting one of them. </span><span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">But we have fixed a lot of them recently, and
so it is in a good state now, that's why my top of trunk build works. </span><span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">As workarounds, which I realise might not be ideal, but you can try using a
trunk build, or wait for clang-9 (or avoid this intrinsic if the rest works for you).</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Hope this helps,</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Sjoerd.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Nancy <nancydreaming@gmail.com><br>
<b>Sent:</b> 12 July 2019 10:21<br>
<b>To:</b> Sjoerd Meijer<br>
<b>Cc:</b> cfe-dev@lists.llvm.org; LLVM Developers Mailing List<br>
<b>Subject:</b> Re: [llvm-dev] [cfe-dev] ARM float16 intrinsic test</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi,<br>
I do not get your result. Do I miss something?<br>
$COMP_ROOT/clang++ --target=arm-arm-eabihf -march=armv8.2a+fp16<br>
arm.cpp -S -o - -O3<br>
<br>
.text<br>
.syntax unified<br>
.eabi_attribute 67, "2.09"<br>
.eabi_attribute 6, 14<br>
.eabi_attribute 7, 65<br>
.eabi_attribute 8, 1<br>
.eabi_attribute 9, 2<br>
.fpu crypto-neon-fp-armv8<br>
.eabi_attribute 12, 4<br>
.eabi_attribute 36, 1<br>
.eabi_attribute 42, 1<br>
.eabi_attribute 34, 0<br>
.eabi_attribute 68, 3<br>
.eabi_attribute 17, 1<br>
.eabi_attribute 20, 1<br>
.eabi_attribute 21, 1<br>
.eabi_attribute 23, 3<br>
.eabi_attribute 24, 1<br>
.eabi_attribute 25, 1<br>
.eabi_attribute 28, 1<br>
.eabi_attribute 38, 1<br>
.eabi_attribute 18, 4<br>
.eabi_attribute 26, 2<br>
.eabi_attribute 14, 0<br>
.file "arm.cpp"<br>
unhandled vld/vst lane type<br>
UNREACHABLE executed at<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:2072!<br>
Stack dump:<br>
0. Program arguments:<br>
/home/nancy/rpp_llvm/build-project/bin/clang-8 -cc1 -triple<br>
armv8.2a-arm-unknown-eabihf -S -disable-free -main-file-name arm.cpp<br>
-mrelocation-model static -mthread-model posix -mdisable-fp-elim<br>
-fmath-errno -mconstructor-aliases -nostdsysteminc -target-cpu generic<br>
-target-feature +fullfp16 -target-feature +strict-align -target-abi<br>
aapcs -mfloat-abi hard -fallow-half-arguments-and-returns<br>
-dwarf-column-info -debugger-tuning=gdb -coverage-notes-file<br>
/home/nancy/rpp_llvm/test/-.gcno -resource-dir<br>
/home/nancy/rpp_llvm/build-project/lib/clang/8.0.0 -internal-isystem<br>
/home/nancy/rpp_llvm/build-project/lib/clang/8.0.0/include<br>
-internal-isystem include -O3 -fdeprecated-macro<br>
-fdebug-compilation-dir /home/nancy/rpp_llvm/test -ferror-limit 19<br>
-fmessage-length 81 -fno-signed-char -fobjc-runtime=gcc<br>
-fcxx-exceptions -fexceptions -fdiagnostics-show-option<br>
-vectorize-loops -vectorize-slp -o - -x c++ arm.cpp -faddrsig<br>
1. <eof> parser at end of file<br>
2. Code generation<br>
3. Running pass 'Function Pass Manager' on module 'arm.cpp'.<br>
4. Running pass 'ARM Instruction Selection' on function<br>
'@_Z18test_vst4_lane_f16PDh13float16x4x4_t'<br>
#0 0x000000000444190d llvm::sys::PrintStackTrace(llvm::raw_ostream&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:495:0<br>
#1 0x00000000044419a0 PrintStackTraceSignalHandler(void*)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:559:0<br>
#2 0x000000000443f55a llvm::sys::RunSignalHandlers()<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/Support/Signals.cpp:69:0<br>
#3 0x0000000004441308 SignalHandler(int)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:358:0<br>
#4 0x00007fc6fa271390 __restore_rt<br>
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)<br>
#5 0x00007fc6f8fe3428 gsignal<br>
/build/glibc-LK5gWL/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0<br>
#6 0x00007fc6f8fe502a abort /build/glibc-LK5gWL/glibc-2.23/stdlib/abort.c:91:0<br>
#7 0x00000000043abcc4 bindingsErrorHandler(void*,<br>
std::__cxx11::basic_string<char, std::char_traits<char>,<br>
std::allocator<char> > const&, bool)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/Support/ErrorHandling.cpp:231:0<br>
#8 0x0000000002db244e (anonymous<br>
namespace)::ARMDAGToDAGISel::SelectVLDSTLane(llvm::SDNode*, bool,<br>
bool, unsigned int, unsigned short const*, unsigned short const*)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:2074:0<br>
#9 0x0000000002dbc3ad (anonymous<br>
namespace)::ARMDAGToDAGISel::Select(llvm::SDNode*)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:3781:0<br>
#10 0x000000000559dc93<br>
llvm::SelectionDAGISel::DoInstructionSelection()<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1068:0<br>
#11 0x000000000559cfdd llvm::SelectionDAGISel::CodeGenAndEmitDAG()<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:907:0<br>
#12 0x000000000559b467<br>
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,<br>
true, false, void>, false, true>,<br>
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,<br>
true, false, void>, false, true>, bool&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:670:0<br>
#13 0x00000000055a19ed<br>
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1789:0<br>
#14 0x000000000559a134<br>
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:472:0<br>
#15 0x0000000002d9f8af (anonymous<br>
namespace)::ARMDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:66:0<br>
#16 0x0000000003689502<br>
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:74:0<br>
#17 0x0000000003b752e7<br>
llvm::FPPassManager::runOnFunction(llvm::Function&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1644:0<br>
#18 0x0000000003b75559 llvm::FPPassManager::runOnModule(llvm::Module&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1679:0<br>
#19 0x0000000003b75960 (anonymous<br>
namespace)::MPPassManager::runOnModule(llvm::Module&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1744:0<br>
#20 0x0000000003b7616d<br>
llvm::legacy::PassManagerImpl::run(llvm::Module&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1857:0<br>
#21 0x0000000003b763b1 llvm::legacy::PassManager::run(llvm::Module&)<br>
/home/nancy/rpp_llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1889:0<br>
#22 0x000000000473cfa9 (anonymous<br>
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,<br>
std::unique_ptr<llvm::raw_pwrite_stream,<br>
std::default_delete<llvm::raw_pwrite_stream> >)<br>
/home/nancy/rpp_llvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:881:0<br>
#23 0x00000000047404ee<br>
clang::EmitBackendOutput(clang::DiagnosticsEngine&,<br>
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,<br>
clang::TargetOptions const&, clang::LangOptions const&,<br>
llvm::DataLayout const&, llvm::Module*, clang::BackendAction,<br>
std::unique_ptr<llvm::raw_pwrite_stream,<br>
std::default_delete<llvm::raw_pwrite_stream> >)<br>
/home/nancy/rpp_llvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1318:0<br>
#24 0x0000000005692719<br>
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)<br>
/home/nancy/rpp_llvm/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:295:0<br>
#25 0x0000000006bf44fb clang::ParseAST(clang::Sema&, bool, bool)<br>
/home/nancy/rpp_llvm/llvm-project/clang/lib/Parse/ParseAST.cpp:177:0<br>
#26 0x0000000004f12e87 clang::ASTFrontendAction::ExecuteAction()<br>
/home/nancy/rpp_llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1037:0<br>
#27 0x0000000005690548 clang::CodeGenAction::ExecuteAction()<br>
/home/nancy/rpp_llvm/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1049:0<br>
#28 0x0000000004f12866 clang::FrontendAction::Execute()<br>
/home/nancy/rpp_llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:939:0<br>
#29 0x0000000004e98ebc<br>
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)<br>
/home/nancy/rpp_llvm/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:956:0<br>
#30 0x00000000050718fd<br>
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)<br>
/home/nancy/rpp_llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:268:0<br>
#31 0x00000000024795a0 cc1_main(llvm::ArrayRef<char const*>, char<br>
const*, void*) /home/nancy/rpp_llvm/llvm-project/clang/tools/driver/cc1_main.cpp:219:0<br>
#32 0x000000000246e87c ExecuteCC1Tool(llvm::ArrayRef<char const*>,<br>
llvm::StringRef)<br>
/home/nancy/rpp_llvm/llvm-project/clang/tools/driver/driver.cpp:310:0<br>
#33 0x000000000246f5c1 main<br>
/home/nancy/rpp_llvm/llvm-project/clang/tools/driver/driver.cpp:382:0<br>
#34 0x00007fc6f8fce830 __libc_start_main<br>
/build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:325:0<br>
#35 0x000000000246c199 _start<br>
(/home/nancy/rpp_llvm/build-project/bin/clang-8+0x246c199)<br>
clang-8: error: unable to execute command: Aborted (core dumped)<br>
clang-8: error: clang frontend command failed due to signal (use -v to<br>
see invocation)<br>
clang version 8.0.0<br>
Target: arm-arm-unknown-eabihf<br>
Thread model: posix<br>
InstalledDir: /home/nancy/rpp_llvm/build-project/bin<br>
clang-8: note: diagnostic msg: PLEASE submit a bug report to<br>
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed<br>
source, and associated run script.<br>
clang-8: note: diagnostic msg:<br>
********************<br>
<br>
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:<br>
Preprocessed source(s) and associated run script(s) are located at:<br>
clang-8: note: diagnostic msg: /tmp/arm-e3b4b0.cpp<br>
clang-8: note: diagnostic msg: /tmp/arm-e3b4b0.sh<br>
clang-8: note: diagnostic msg:<br>
<br>
********************<br>
<br>
On Fri, Jul 12, 2019 at 4:29 PM Sjoerd Meijer <Sjoerd.Meijer@arm.com> wrote:<br>
><br>
> Hello,<br>
><br>
> The compiler really shouldn't crash, we should raise a bug report for that, but I think this is an options problem.<br>
><br>
> Looks like you want to target FP16 because you're using -target-feature +fullfp16. FP16 is an extension to Armv8.2-A, and so something like this worked for me:<br>
><br>
> clang++ --target=arm-arm-eabihf -march=armv8.2a+fp16 arm.cpp -S -o - -O3<br>
><br>
> and gives:<br>
><br>
> _Z18test_vst4_lane_f16PDh13float16x4x4_t:<br>
> vst4.16 {d0[3], d1[3], d2[3], d3[3]}, [r0]<br>
> bx lr<br>
><br>
> Is that what you were looking for?<br>
> Cheers,<br>
> Sjoerd.<br>
><br>
</div>
</span></font></div>
</body>
</html>