In SPIRVWriter.cpp, it's incorrect to map minimum to OpenCLLIB::Fmin due to differences in NaN behaviour:
llvm.minimum:
If either operand is a NaN, returns NaN.
fmin:
If one operand is a NaN, fmin returns the other argument. If both arguments are NaNs, fmin returns a NaN.