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

--- Comment #18 from Maciej W. Rozycki <macro at orcam dot me.uk> ---
Any fix will have to be based on valid code though and the lone presence
of inline asm is not supposed to prevent optimisations from being used,
e.g. I may have to insert a memory barrier into my code for some reason:

asm volatile ("" : : : "memory");

and expect vector optimisations to continue being applied to the function
the barrier is in.  So provided that your report is indeed valid, any fix
may not indeed affect the reproducer in any way.

Alternatively you can save the vector CSRs at the beginning of your asm,
set them according to your needs for the operation(s) performed, execute
the operation(s) and restore the original contents of the CSRs before
exiting the asm.

And last but not least: is vector FMA not an operation the compiler can
emit itself from C code, such as by calling a suitable intrinsic on
vector data?

Reply via email to