https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112092
demin.han at starfivetech dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |demin.han at starfivetech dot com --- Comment #17 from demin.han at starfivetech dot com --- (In reply to Maciej W. Rozycki from comment #16) > As I say GCC doesn't know the inline asm makes use of the vector unit, so > the compiler is free to make any optimisations that it can see fit based > on vector code it has produced itself. Actually in this case there is no > (visible) vector unit use in this function, so code for the intrinsic has > been only artificially retained due to the use of `volatile' keyword. > > So I repeat: does the problem persist with the inline asm corrected? That's the minimal case for explain the issue. We encouter two places mix use of inline ams and rvv instrinsic. One of them located in: https://github.com/ucb-bar/saturn-vectors/blob/3569cf984cdc0e5e3f56e8a22ce6e0a4046853c7/benchmarks/common/ara/spmv.c#L44