Peter Trommler pushed to branch wip/T26519 at Glasgow Haskell Compiler / GHC Commits: 9ed33fa4 by Peter Trommler at 2025-12-01T15:21:02+01:00 Fix shift right at smaller than word sizes Shift amount is always given in word size. - - - - - 1 changed file: - compiler/GHC/CmmToAsm/PPC/CodeGen.hs Changes: ===================================== compiler/GHC/CmmToAsm/PPC/CodeGen.hs ===================================== @@ -2437,8 +2437,8 @@ srCode width sgn instr x y = do let op_len = max W32 width extend = if sgn then extendSExpr else extendUExpr (src1, code1) <- getSomeReg (extend width op_len x) - (src2, code2) <- getSomeReg (extendUExpr width op_len y) - -- Note: Shift amount `y` is unsigned + (src2, code2) <- getSomeReg y + let code dst = code1 `appOL` code2 `snocOL` instr (intFormat op_len) dst src1 (RIReg src2) return (Any (intFormat width) code) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9ed33fa417279e7834950f2e795b96c9... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9ed33fa417279e7834950f2e795b96c9... You're receiving this email because of your account on gitlab.haskell.org.