summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmLint.hs
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@mit.edu>2011-04-18 20:06:11 +0100
committerEdward Z. Yang <ezyang@mit.edu>2011-04-27 18:01:52 +0100
commitcb5a1b4c5fee21a2bd79bd1469684f1ff97804fa (patch)
treeada15b3e2beedab3c6022835cfb4331b05770676 /compiler/cmm/CmmLint.hs
parentc18358bf9b0f1aacbd9c5e8d8515c1fc5031c249 (diff)
downloadhaskell-cb5a1b4c5fee21a2bd79bd1469684f1ff97804fa.tar.gz
Eliminate GC check when no extra stack is used.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Diffstat (limited to 'compiler/cmm/CmmLint.hs')
-rw-r--r--compiler/cmm/CmmLint.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs
index c14ad65788..32fead337e 100644
--- a/compiler/cmm/CmmLint.hs
+++ b/compiler/cmm/CmmLint.hs
@@ -153,6 +153,7 @@ lintTarget (CmmPrim {}) = return ()
checkCond :: CmmExpr -> CmmLint ()
checkCond (CmmMachOp mop _) | isComparisonMachOp mop = return ()
+checkCond (CmmLit (CmmInt x t)) | x == 0 || x == 1, t == wordWidth = return () -- constant values
checkCond expr = cmmLintErr (hang (text "expression is not a conditional:") 2
(ppr expr))