The mid-end was generating vector smin/smax/umin/umax nodes, but
we were using vbsl to generatate the code. This adds the vmin/vmax
patterns and a test to check that we are now generating vmin/vmax
instructions.
Details
Diff Detail
Event Timeline
This isn't the best way to do this. Instead, we should be modifying the definition of VMINs and friends to match a "smin" node instead of a "int_arm_neon_smin".
Then, we should add lowering to ARMISelLowering.cpp to map from arm_neon_vmins to ISD::SMIN. See how I did it for FMINNAN/FMINNUM as an example.
I've noticed that you've copied this mechanism from the AArch64 backend. Mea culpa - I obviously did it suboptimally there too. Either change AArch64 too as a followup or raise a PR and I'll get around to it.
Cheers,
James
Sorry James, I assumed it was ok. I'm ok with waiting for a proper implementation on this, and then change the AArch64 later.
Removed patterns and modified .td definition to match generic min/max nodes
instead of intrisic ones.
Added code to lower neon intrinsic nodes to generic min/max.