~jojo/Carth

a62b1e17a9d83e90478c846f7bb7b3e383104040 — JoJo 1 year, 10 months ago 5f2dd7b
Fix bools not truncated from i8 to i1 for condbr
1 files changed, 1 insertions(+), 1 deletions(-)

M src/Codegen.hs
M src/Codegen.hs => src/Codegen.hs +1 -1
@@ 489,7 489,7 @@ genIf pred conseq alt = do
    conseqL <- newName "consequent"
    altL <- newName "alternative"
    nextL <- newName "next"
    predV <- getLocal =<< genExpr pred
    predV <- emitAnon . flip trunc i1 =<< getLocal =<< genExpr pred
    commitToNewBlock (condbr predV conseqL altL) conseqL
    conseqV <- getLocal =<< genExpr conseq
    fromConseqL <- use currentBlockLabel