File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -1963,19 +1963,7 @@ namespace LCompilers {
1963
1963
return tuple_hash;
1964
1964
}
1965
1965
case ASR::ttypeType::Logical: {
1966
- llvm::AllocaInst *hash_value = builder->CreateAlloca (llvm::Type::getInt32Ty (context), nullptr );
1967
-
1968
- llvm::Value* is_key_one = builder->CreateICmpEQ (key,
1969
- llvm::ConstantInt::get (context, llvm::APInt (1 , 1 )));
1970
-
1971
- llvm_utils->create_if_else (is_key_one, [&]() {
1972
- LLVM::CreateStore (*builder, llvm::ConstantInt::get (
1973
- context, llvm::APInt (32 , 1 )), hash_value);
1974
- }, [=]() {
1975
- LLVM::CreateStore (*builder, llvm::ConstantInt::get (
1976
- context, llvm::APInt (32 , 0 )), hash_value);
1977
- });
1978
- return hash_value;
1966
+ return builder->CreateZExt (key, llvm::Type::getInt32Ty (context));
1979
1967
}
1980
1968
default : {
1981
1969
throw LCompilersException (" Hashing " + ASRUtils::type_to_str_python (key_asr_type) +
You can’t perform that action at this time.
0 commit comments