[commit: ghc] wip/carter/remove_x87Registers: simplify some logic in x86/codegen.hs that now seems redundant (8839ed6)

git at git.haskell.org git at git.haskell.org
Thu Dec 27 16:59:45 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/carter/remove_x87Registers
Link       : http://ghc.haskell.org/trac/ghc/changeset/8839ed6afc3647bdc175da10da32757563ec261d/ghc

>---------------------------------------------------------------

commit 8839ed6afc3647bdc175da10da32757563ec261d
Author: Carter Tazio Schonwald <carter.schonwald at gmail.com>
Date:   Sat Dec 22 12:36:51 2018 -0500

    simplify some logic in x86/codegen.hs that now seems redundant


>---------------------------------------------------------------

8839ed6afc3647bdc175da10da32757563ec261d
 compiler/nativeGen/X86/CodeGen.hs | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index 353f293..e9ffa03 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -1244,10 +1244,7 @@ getNonClobberedOperand (CmmLoad mem pk) = do
   is32Bit <- is32BitPlatform
   -- this logic could be simplified
   -- TODO FIXME
-  if  (not (isFloatType pk) || use_sse2)
-    -- should evaluate to True always because use_sse2 is always true
-    -- so (not _ )|| True == true
-      && (if is32Bit then not (isWord64 pk) else True)
+  if   (if is32Bit then not (isWord64 pk) else True)
       -- if 32bit and pk is at float/double/simd value
       -- or if 64bit
       --  this could use some eyeballs or i'll need to stare at it more later
@@ -2492,7 +2489,7 @@ genCCall32' dflags target dest_regs args = do
         roundTo a x | x `mod` a == 0 = x
                     | otherwise = x + a - (x `mod` a)
 
-        push_arg ::  CmmActual {-current argument-}
+        push_arg :: CmmActual {-current argument-}
                         -> NatM InstrBlock  -- code
 
         push_arg  arg -- we don't need the hints on x86



More information about the ghc-commits mailing list