Commit 30665bdd authored by Bertram Felgenhauer's avatar Bertram Felgenhauer
Browse files

FIX #1916: don't try to convert float constants to int in CMM optimizer

parent a6d4d67e
......@@ -341,7 +341,8 @@ cmmMachOpFold cmp [CmmMachOp conv [x], CmmLit (CmmInt i _)]
= cmmMachOpFold narrow_cmp [x, CmmLit (CmmInt narrow_i rep)]
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)
maybe_conversion _ = Nothing
maybe_comparison (MO_U_Gt _) rep = Just (MO_U_Gt rep)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment