If mask is a scalar, it always converts to !fir.box<!fir.array<1xi1>>. The wrong value may be picked up when passing to the function on the big endian platform. This patch is to do the conversion based on the original type of the mask and convert the value to i1 after the load.