diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-07-11 10:53:33 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-15 04:05:34 -0400 |
commit | 51dbfa52df483822b99bb191d2ffc0943954e1d3 (patch) | |
tree | 69ccacf0ed38e99f726c85f51741635c721a431f | |
parent | cdc4a6b0f71bbd16a11f23e455b28c0c15720b38 (diff) | |
download | haskell-51dbfa52df483822b99bb191d2ffc0943954e1d3.tar.gz |
StgToCmm: Use CmmRegOff smart constructor
Previously we would generate expressions of the form
`CmmRegOff BaseReg 0`. This should do no harm (and really should be
handled by the NCG anyways) but it's better to just generate a plain
`CmmReg`.
-rw-r--r-- | compiler/GHC/StgToCmm/CgUtils.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/StgToCmm/CgUtils.hs b/compiler/GHC/StgToCmm/CgUtils.hs index 1ed7f2384f..25cd5e04c1 100644 --- a/compiler/GHC/StgToCmm/CgUtils.hs +++ b/compiler/GHC/StgToCmm/CgUtils.hs @@ -121,7 +121,7 @@ regTableOffset dflags n = get_Regtable_addr_from_offset :: DynFlags -> Int -> CmmExpr get_Regtable_addr_from_offset dflags offset = if haveRegBase (targetPlatform dflags) - then CmmRegOff baseReg offset + then cmmRegOff baseReg offset else regTableOffset dflags offset -- | Fixup global registers so that they assign to locations within the |