Open Quuxplusone opened 6 years ago
Attached bugpoint-reduced-simplified.ll
(2123 bytes, text/plain): reduced ll file
I should note that part of the problem might be related to armv8 + "krait" (as opposed to "kryo"). Pirama noticed this particular aspect of the issue, so it is possible that the build misconfiguration is causing the problem. Still, I would expect that we get a proper error message for that misconfiguration, and not a crash.
Right, after changing "target-cpu"="krait" to "target-cpu"="kryo" in the function attributes, this no longer crashes.
krait seems to be a v7a core, kryo a v8a core.
I'm not sure what the root issue is here. Maybe it's the front-end generating a call to the llvm.maxnum intrinsic (see https://llvm.org/docs/LangRef.html#llvm-maxnum-intrinsic ) which may not be supported when targeting pre-v8a?
My guess is that clang was called with something like:
clang -target armv7--linux-android -mcpu=krait -mfpu=neon-fp-armv8 ...
Otherwise I don't see how target-features can contain "...,+fp-armv8,...+neon,+vfp4,..." in section attributes #0, given that krait cpu is indeed defined as an ARMv7a core with VPFv4 features.
I'm still too new in llvm to say where and how incoherent options has to be handled, but it seems to be the issue for me here (fmaxnum/fminnum are used to generate vmaxnm/vminnm instructions which are only available on ARMv8 cores, see http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802b/CIHFCJCF.html).
bugpoint-reduced-simplified.ll
(2123 bytes, text/plain)