[PATCH] Fix crash when using NEON array types in inline ASM

Tim Northover t.p.northover at gmail.com
Wed Nov 13 17:07:11 PST 2013

Hi Oliver,

> The following code causes a crash in the LLVM backend, as uint8x8x4_t is a
> struct containing an array, which is not handled by the ARM backend. This
> patch prevents the crash.

This seems to be slightly in conflict with some generic code to handle
this situation. If, instead of calling report_fatal_error you defer to
generic code, it eventually reaches
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:6435 which reports
the error in a different (probably less panicked and more friendly)

If it stopped there, that would be perfect. Unfortunately for some
reason Clang (but not llc) decides to carry on regardless and reaches
another assertion.

So basically, I think there are two issues here:
1. ARM should defer to the generic handling for invalid constraints by
"break;"ing in the bad case.
2. We should work out why the generic code is crashing Clang. That way
al targets can benefit (for example I can produce similar failures on
X86 and AArch64 suffers from exactly the same issue).



More information about the llvm-commits mailing list