Simplify implementation of Rust intrinsics by using type parameters in the cache

This commit is contained in:
sayantn
2025-05-30 21:41:36 +05:30
parent 14863ea077
commit d56fcd968d
8 changed files with 450 additions and 800 deletions

View File

@@ -23,7 +23,7 @@ use crate::common::{AtomicRmwBinOp, IntPredicate, RealPredicate, Synchronization
use crate::mir::operand::{OperandRef, OperandValue};
use crate::mir::place::{PlaceRef, PlaceValue};
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum OverflowOp {
Add,
Sub,
@@ -215,7 +215,7 @@ pub trait BuilderMethods<'a, 'tcx>:
fn checked_binop(
&mut self,
oop: OverflowOp,
ty: Ty<'_>,
ty: Ty<'tcx>,
lhs: Self::Value,
rhs: Self::Value,
) -> (Self::Value, Self::Value);