Closed
Description
We have this code in SemaRISCV.cpp to disable f16 intrinsics without Zvfh.
if (BaseType == BasicType::Float16) {
if ((Record.RequiredExtensions & RVV_REQ_Zvfhmin) == RVV_REQ_Zvfhmin) {
if (!TI.hasFeature("zvfhmin"))
continue;
} else if (!TI.hasFeature("zvfh")) {
continue;
}
}
For the conversion intrinsics, the BaseType is integer, not floating point, so we miss this check if any of the source operands are Float16.
This causes a crash with Zvfhmin https://godbolt.org/z/Khfx8j6jW