Add builtins for basic float operations (#3897)

Adds support for unary `-` and binary `+`, `-`, `*`, `/` for floating
point types.

Real literals are now transformed to `llvm::APFloat`s during the check
phase into the `FloatLiteral` instruction.

This PR likely collides a bit with #3892 and might need to be updated
when that one is merged.
This commit is contained in:
Pablo Paglilla
2024-04-19 22:50:54 +00:00
committed by GitHub
parent db324c7247
commit cae62765af
43 changed files with 1550 additions and 93 deletions
+2
View File
@@ -978,6 +978,7 @@ class TypeCompleter {
case SemIR::Converted::Kind:
case SemIR::Deref::Kind:
case SemIR::FacetTypeAccess::Kind:
case SemIR::FloatLiteral::Kind:
case SemIR::FieldDecl::Kind:
case SemIR::FunctionDecl::Kind:
case SemIR::ImplDecl::Kind:
@@ -1055,6 +1056,7 @@ class TypeCompleter {
case SemIR::AssociatedEntityType::Kind:
case SemIR::BindSymbolicName::Kind:
case SemIR::FloatType::Kind:
case SemIR::IntType::Kind:
case SemIR::PointerType::Kind:
case SemIR::UnboundElementType::Kind: