= cmmMachOpFold narrow_cmp [x, CmmLit (CmmInt narrow_i rep)]
where
maybe_conversion (MO_U_Conv from _) = Just (from, narrowU)
- maybe_conversion (MO_S_Conv from _) = Just (from, narrowS)
+ maybe_conversion (MO_S_Conv from _)
+ | not (isFloatingRep from) = Just (from, narrowS)
+ -- don't attempt to apply this optimisation when the source
+ -- is a float; see #1916
maybe_conversion _ = Nothing
maybe_comparison (MO_U_Gt _) rep = Just (MO_U_Gt rep)