https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128432

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
truncv8sfv8hf2 isn't the very same same-size-same-lane conversion you described
in the original description.  Still if the target has a direct conversion
instruction for that it's the correct pattern to use.

TARGET_VECTORIZE_PREFERRED_SIMD_MODE shouldn't be relevant, it's the
TARGET_VECTORIZE_RELATED_MODE hook that likely wrecks things for you
and that should allow V8SFmode together with V8HFmode - you might
want to trace the default implementation to see whether that rejects
the case.

What "preferred" mode is being used depends on what scalar access is
processed first - so it can be quite randomly choosing based on SFmode
or HFmode.  You should make sure that related_mode behaves the same
for both the preferred V8HF and V8SF, allowing both to coexist.

Reply via email to