Running an end-to-end test last week I noticed that a lot of the ACLE
intrinsics that operate differently on vectors of signed and unsigned
integers were ending up generating the signed version of the
instruction unconditionally. This is because the IR intrinsics had no
way to distinguish signed from unsigned: the LLVM type system just
calls them both v8i16 (or whatever), so you need either separate
intrinsics for signed and unsigned, or a flag parameter that tells
ISel which one to choose.
This patch fixes all the problems of that kind that I've noticed, by
adding an i32 flag parameter to many of the IR intrinsics which is set
to 1 for unsigned (matching the existing practice in cases where we
got it right), and conditioning all the isel patterns on that flag. So
the fundamental change is in IntrinsicsARM.td, changing the
low-level IR intrinsics API; there are knock-on changes in
arm_mve.td (adjusting code gen for the ACLE intrinsics to use the
modified API) and in ARMInstrMVE.td (adjusting isel to expect the
new unsigned flags). The rest of this patch is boringly updating tests.
What do these 0's mean?