llvm.org GIT mirror llvm / e1acf77
[C API] Add LLVMConstExactUDiv and LLVMBuildExactUDiv functions. Summary: These are analog to the existing LLVMConstExactSDiv and LLVMBuildExactSDiv functions. Reviewers: deadalnix, majnemer Subscribers: majnemer, llvm-commits Differential Revision: https://reviews.llvm.org/D25259 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283269 91177308-0d34-0410-b5e6-96231b3b80d8 Manuel Jacob 2 years ago
2 changed file(s) with 14 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
17511751 LLVMValueRef LLVMConstNUWMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
17521752 LLVMValueRef LLVMConstFMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
17531753 LLVMValueRef LLVMConstUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
1754 LLVMValueRef LLVMConstExactUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
17541755 LLVMValueRef LLVMConstSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
17551756 LLVMValueRef LLVMConstExactSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
17561757 LLVMValueRef LLVMConstFDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
29612962 const char *Name);
29622963 LLVMValueRef LLVMBuildUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
29632964 const char *Name);
2965 LLVMValueRef LLVMBuildExactUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
2966 const char *Name);
29642967 LLVMValueRef LLVMBuildSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
29652968 const char *Name);
29662969 LLVMValueRef LLVMBuildExactSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
11751175 LLVMValueRef LLVMConstUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) {
11761176 return wrap(ConstantExpr::getUDiv(unwrap(LHSConstant),
11771177 unwrap(RHSConstant)));
1178 }
1179
1180 LLVMValueRef LLVMConstExactUDiv(LLVMValueRef LHSConstant,
1181 LLVMValueRef RHSConstant) {
1182 return wrap(ConstantExpr::getExactUDiv(unwrap(LHSConstant),
1183 unwrap(RHSConstant)));
11781184 }
11791185
11801186 LLVMValueRef LLVMConstSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) {
26232629 return wrap(unwrap(B)->CreateUDiv(unwrap(LHS), unwrap(RHS), Name));
26242630 }
26252631
2632 LLVMValueRef LLVMBuildExactUDiv(LLVMBuilderRef B, LLVMValueRef LHS,
2633 LLVMValueRef RHS, const char *Name) {
2634 return wrap(unwrap(B)->CreateExactUDiv(unwrap(LHS), unwrap(RHS), Name));
2635 }
2636
26262637 LLVMValueRef LLVMBuildSDiv(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
26272638 const char *Name) {
26282639 return wrap(unwrap(B)->CreateSDiv(unwrap(LHS), unwrap(RHS), Name));