NCG: Fix a bug in jump shortcutting.
When checking if a jump has more than one destination account for the possibility of some jumps not being representable by a BlockId. We do so by having isJumpishInstr return a `Maybe BlockId` where Nothing represents non-BlockId jump destinations. Fixes #24507
Showing
- compiler/GHC/CmmToAsm/AArch64/Instr.hs 13 additions, 8 deletionscompiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs 2 additions, 2 deletionscompiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Instr.hs 10 additions, 0 deletionscompiler/GHC/CmmToAsm/Instr.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs 7 additions, 4 deletionscompiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs 2 additions, 2 deletionscompiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs
- compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs 1 addition, 1 deletioncompiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs
- compiler/GHC/CmmToAsm/Reg/Liveness.hs 4 additions, 4 deletionscompiler/GHC/CmmToAsm/Reg/Liveness.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs 6 additions, 3 deletionscompiler/GHC/CmmToAsm/X86/Instr.hs
- testsuite/tests/codeGen/should_run/T24507.hs 15 additions, 0 deletionstestsuite/tests/codeGen/should_run/T24507.hs
- testsuite/tests/codeGen/should_run/T24507.stdout 7 additions, 0 deletionstestsuite/tests/codeGen/should_run/T24507.stdout
- testsuite/tests/codeGen/should_run/T24507_cmm.cmm 35 additions, 0 deletionstestsuite/tests/codeGen/should_run/T24507_cmm.cmm
- testsuite/tests/codeGen/should_run/all.T 3 additions, 0 deletionstestsuite/tests/codeGen/should_run/all.T
Loading
Please register or sign in to comment