diff options
author | M Farkas-Dyck <strake888@proton.me> | 2022-09-29 01:03:13 -0800 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-10-19 10:46:29 -0400 |
commit | 83638dce4e20097b9b7073534e488a92dce6e88f (patch) | |
tree | e18b4b2484354c8875914a4b35a37d0377258eb4 /compiler/GHC/CmmToAsm/X86/CodeGen.hs | |
parent | f7b7a3122185222d5059e37315991afcf319e43c (diff) | |
download | haskell-83638dce4e20097b9b7073534e488a92dce6e88f.tar.gz |
Scrub various partiality involving lists (again).
Lets us avoid some use of `head` and `tail`, and some panics.
Diffstat (limited to 'compiler/GHC/CmmToAsm/X86/CodeGen.hs')
-rw-r--r-- | compiler/GHC/CmmToAsm/X86/CodeGen.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/CmmToAsm/X86/CodeGen.hs b/compiler/GHC/CmmToAsm/X86/CodeGen.hs index 9861177c3a..fd85ae6154 100644 --- a/compiler/GHC/CmmToAsm/X86/CodeGen.hs +++ b/compiler/GHC/CmmToAsm/X86/CodeGen.hs @@ -3353,9 +3353,9 @@ invertCondBranches (Just cfg) keep bs = invert bs where invert :: [NatBasicBlock Instr] -> [NatBasicBlock Instr] - invert ((BasicBlock lbl1 ins@(_:_:_xs)):b2@(BasicBlock lbl2 _):bs) + invert (BasicBlock lbl1 ins:b2@(BasicBlock lbl2 _):bs) | --pprTrace "Block" (ppr lbl1) True, - (jmp1,jmp2) <- last2 ins + Just (jmp1,jmp2) <- last2 ins , JXX cond1 target1 <- jmp1 , target1 == lbl2 --, pprTrace "CutChance" (ppr b1) True |