MO_F_Mul and MO_F_Add are commutative
authorSimon Marlow <marlowsd@gmail.com>
Fri, 3 Aug 2012 15:37:33 +0000 (16:37 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 6 Aug 2012 08:47:33 +0000 (09:47 +0100)
compiler/cmm/CmmMachOp.hs

index 2bf8bc2..5073517 100644 (file)
@@ -198,6 +198,8 @@ isCommutableMachOp mop =
         MO_And _                -> True
         MO_Or _                 -> True
         MO_Xor _                -> True
+        MO_F_Add _              -> True
+        MO_F_Mul _              -> True
         _other                  -> False
 
 -- ----------------------------------------------------------------------------