Skip to content

Commit 4649261

Browse files
committed
Fix unsigned int to int cast
1 parent ea9715b commit 4649261

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libasr/codegen/asr_to_llvm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6329,7 +6329,7 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
63296329
arg_kind != dest_kind )
63306330
{
63316331
if (dest_kind > arg_kind) {
6332-
tmp = builder->CreateSExt(tmp, llvm_utils->getIntType(dest_kind));
6332+
tmp = builder->CreateZExt(tmp, llvm_utils->getIntType(dest_kind));
63336333
} else {
63346334
tmp = builder->CreateTrunc(tmp, llvm_utils->getIntType(dest_kind));
63356335
}

0 commit comments

Comments
 (0)