Skip to content

Commit

Permalink
add exit_check_eq_pallas intrinsic
Browse files Browse the repository at this point in the history
  • Loading branch information
CblPOK-git committed Feb 19, 2024
1 parent 4a5bbc2 commit eed0b50
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions clang/include/clang/Basic/BuiltinsAssigner.def
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ BUILTIN(__builtin_assigner_bit_decomposition_bls12381, "vv*Uig3b", "n")
BUILTIN(__builtin_assigner_bit_composition, "g1v*Uib", "n")

BUILTIN(__builtin_assigner_exit_check, "vb", "n")
BUILTIN(__builtin_assigner_exit_check_eq_pallas, "vg1g1", "n")

BUILTIN(__builtin_assigner_print_native_pallas_field, "vg1", "n")

Expand Down
6 changes: 6 additions & 0 deletions clang/lib/CodeGen/CGBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20723,6 +20723,12 @@ Value *CodeGenFunction::EmitAssignerBuiltinExpr(unsigned int BuiltinID,
ID = Intrinsic::assigner_exit_check;
break;
}
case assigner::BI__builtin_assigner_exit_check_eq_pallas: {
ID = Intrinsic::assigner_exit_check_eq_pallas;
auto ElemTy = llvm::GaloisFieldType::get(context, llvm::GALOIS_FIELD_PALLAS_BASE);
OverloadTypes = {ElemTy};
break;
}
case assigner::BI__builtin_assigner_print_native_pallas_field: {
ID = Intrinsic::assigner_print_native_pallas_field;
auto ElemTy = llvm::GaloisFieldType::get(context, llvm::GALOIS_FIELD_PALLAS_BASE);
Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm/IR/IntrinsicsAssigner.td
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def int_assigner_bit_decomposition_field: Intrinsic<[], [llvm_ptr_ty, llvm_i32_t
def int_assigner_bit_composition: Intrinsic<[llvm_any_ty], [llvm_ptr_ty, llvm_i32_ty, llvm_i1_ty]>;

def int_assigner_exit_check: Intrinsic<[], [llvm_i1_ty]>;
def int_assigner_exit_check_eq_pallas: Intrinsic<[], [llvm_any_ty, LLVMMatchType<0>]>;

def int_assigner_print_native_pallas_field: Intrinsic<[], [llvm_any_ty]>;

Expand Down

0 comments on commit eed0b50

Please sign in to comment.