Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add exit_check_eq_pallas intrinsic #119

Merged
merged 2 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
auto ElemTy = llvm::GaloisFieldType::get(context, llvm::GALOIS_FIELD_PALLAS_BASE);
OverloadTypes = {ElemTy};
akokoshn marked this conversation as resolved.
Show resolved Hide resolved
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: Intrinsic<[], [llvm_any_ty, LLVMMatchType<0>]>;

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

Expand Down