Lookup intrinsic functions
| 91 | |
| 92 | // Lookup intrinsic functions |
| 93 | void DecimalIR::InitializeIntrinsics() { |
| 94 | sadd_with_overflow_fn_ = getOrInsertDeclaration( |
| 95 | module(), llvm::Intrinsic::sadd_with_overflow, types()->i128_type()); |
| 96 | DCHECK_NE(sadd_with_overflow_fn_, nullptr); |
| 97 | |
| 98 | smul_with_overflow_fn_ = getOrInsertDeclaration( |
| 99 | module(), llvm::Intrinsic::smul_with_overflow, types()->i128_type()); |
| 100 | DCHECK_NE(smul_with_overflow_fn_, nullptr); |
| 101 | |
| 102 | i128_with_overflow_struct_type_ = |
| 103 | sadd_with_overflow_fn_->getFunctionType()->getReturnType(); |
| 104 | } |
| 105 | |
| 106 | // CPP: return kScaleMultipliers[scale] |
| 107 | llvm::Value* DecimalIR::GetScaleMultiplier(llvm::Value* scale) { |
no test coverage detected