[cfe-users] Generation of FMA instructions in RISCV

Max Ruttenberg via cfe-users cfe-users at lists.llvm.org
Tue Mar 2 18:19:51 PST 2021

Hi all,

I am using the clang RISCV backend and I am having trouble getting the compiler to generate FMA instructions with the following input.

float test (float first, float second, float third)
	return first * second + third;

I am using -O3 and -ffast-math and I am specifying -march=imfa.

GCC generates FMA instructions with these flags. Is there something I am doing wrong?


More information about the cfe-users mailing list