Home | History | Annotate | Download | only in compiler

Lines Matching refs:TruncationKind

21     case TruncationKind::kNone:
23 case TruncationKind::kBool:
25 case TruncationKind::kWord32:
27 case TruncationKind::kWord64:
29 case TruncationKind::kFloat64:
31 case TruncationKind::kAny:
57 Truncation::TruncationKind Truncation::Generalize(TruncationKind rep1,
58 TruncationKind rep2) {
62 if (LessGeneral(rep1, TruncationKind::kFloat64) &&
63 LessGeneral(rep2, TruncationKind::kFloat64)) {
64 return TruncationKind::kFloat64;
67 if (LessGeneral(rep1, TruncationKind::kAny) &&
68 LessGeneral(rep2, TruncationKind::kAny)) {
69 return TruncationKind::kAny;
73 return TruncationKind::kNone;
78 bool Truncation::LessGeneral(TruncationKind rep1, TruncationKind rep2) {
80 case TruncationKind::kNone:
82 case TruncationKind::kBool:
83 return rep2 == TruncationKind::kBool || rep2 == TruncationKind::kAny;
84 case TruncationKind::kWord32:
85 return rep2 == TruncationKind::kWord32 ||
86 rep2 == TruncationKind::kWord64 ||
87 rep2 == TruncationKind::kFloat64 || rep2 == TruncationKind::kAny;
88 case TruncationKind::kWord64:
89 return rep2 == TruncationKind::kWord64;
90 case TruncationKind::kFloat64:
91 return rep2 == TruncationKind::kFloat64 || rep2 == TruncationKind::kAny;
92 case TruncationKind::kAny:
93 return rep2 == TruncationKind::kAny;