mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 19:50:14 +01:00
Teach comparison interfaces about C++ operators (#7163)
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "toolchain/check/type.h"
|
||||
#include "toolchain/check/type_completion.h"
|
||||
#include "toolchain/sem_ir/builtin_function_kind.h"
|
||||
#include "toolchain/sem_ir/core_interface.h"
|
||||
#include "toolchain/sem_ir/ids.h"
|
||||
#include "toolchain/sem_ir/typed_insts.h"
|
||||
|
||||
@@ -301,6 +302,57 @@ static auto BuildCppBinaryOperatorWitness(
|
||||
query_specific_interface_id, {fn_id});
|
||||
}
|
||||
|
||||
static auto BuildCppComparisonWitness(
|
||||
Context& context, SemIR::LocId loc_id, CoreIdentifier interface,
|
||||
llvm::ArrayRef<CoreIdentifier> operator_names,
|
||||
SemIR::ConstantId query_self_const_id,
|
||||
SemIR::SpecificInterfaceId query_specific_interface_id) -> SemIR::InstId {
|
||||
auto self_type_id =
|
||||
context.types().GetTypeIdForTypeConstantId(query_self_const_id);
|
||||
auto args =
|
||||
context.inst_blocks().Get(context.specifics()
|
||||
.Get(context.specific_interfaces()
|
||||
.Get(query_specific_interface_id)
|
||||
.specific_id)
|
||||
.args_id);
|
||||
CARBON_CHECK(args.size() == 1, "Binary operator missing an argument");
|
||||
|
||||
auto arg_type_id = context.types().GetTypeIdForTypeInstId(args[0]);
|
||||
auto operators = llvm::SmallVector<SemIR::InstId, 4>();
|
||||
for (auto operator_name : operator_names) {
|
||||
auto lookup_id = LookupCppOperator(
|
||||
context, loc_id,
|
||||
{.interface_name = interface, .op_name = operator_name},
|
||||
{self_type_id, arg_type_id});
|
||||
if (lookup_id == SemIR::ErrorInst::InstId ||
|
||||
lookup_id == SemIR::InstId::None) {
|
||||
// `T.(Core.EqWith(U))` is only valid if both `t == u` and `t != u` are
|
||||
// valid expressions. Looking for `t != u` is pointless if we're unable to
|
||||
// find a valid `t == u`, because `t != u` won't provide further useful
|
||||
// information at this point.
|
||||
//
|
||||
// The behavior is dependent on which expression is checked first: no
|
||||
// diagnostic will be emitted for an erroneous `operator!=` if lookup for
|
||||
// `operator==` produces `SemIR::InstId::None`.
|
||||
return lookup_id;
|
||||
}
|
||||
|
||||
auto return_type_id = context.functions()
|
||||
.Get(context.insts()
|
||||
.GetAs<SemIR::FunctionDecl>(lookup_id)
|
||||
.function_id)
|
||||
.return_type_inst_id;
|
||||
if (!return_type_id.has_value()) {
|
||||
return SemIR::InstId::None;
|
||||
}
|
||||
|
||||
operators.push_back(lookup_id);
|
||||
}
|
||||
|
||||
return BuildCustomWitness(context, loc_id, query_self_const_id,
|
||||
query_specific_interface_id, operators);
|
||||
}
|
||||
|
||||
auto LookupCppImpl(Context& context, SemIR::LocId loc_id,
|
||||
SemIR::CoreInterface core_interface,
|
||||
SemIR::ConstantId query_self_const_id,
|
||||
@@ -341,6 +393,17 @@ auto LookupCppImpl(Context& context, SemIR::LocId loc_id,
|
||||
/*has_associated_result_type=*/false,
|
||||
query_self_const_id,
|
||||
query_specific_interface_id);
|
||||
case SemIR::CoreInterface::EqWith:
|
||||
return BuildCppComparisonWitness(
|
||||
context, loc_id, CoreIdentifier::EqWith,
|
||||
{CoreIdentifier::Equal, CoreIdentifier::NotEqual},
|
||||
query_self_const_id, query_specific_interface_id);
|
||||
case SemIR::CoreInterface::OrderedWith:
|
||||
return BuildCppComparisonWitness(
|
||||
context, loc_id, CoreIdentifier::OrderedWith,
|
||||
{CoreIdentifier::Less, CoreIdentifier::LessOrEquivalent,
|
||||
CoreIdentifier::Greater, CoreIdentifier::GreaterOrEquivalent},
|
||||
query_self_const_id, query_specific_interface_id);
|
||||
case SemIR::CoreInterface::Copy:
|
||||
return BuildCopyWitness(context, loc_id, query_self_const_id,
|
||||
query_specific_interface_id);
|
||||
|
||||
@@ -709,12 +709,14 @@ auto LookupCustomWitness(Context& context, SemIR::LocId loc_id,
|
||||
case SemIR::CoreInterface::Default:
|
||||
case SemIR::CoreInterface::DivAssignWith:
|
||||
case SemIR::CoreInterface::DivWith:
|
||||
case SemIR::CoreInterface::EqWith:
|
||||
case SemIR::CoreInterface::Inc:
|
||||
case SemIR::CoreInterface::ModAssignWith:
|
||||
case SemIR::CoreInterface::ModWith:
|
||||
case SemIR::CoreInterface::MulAssignWith:
|
||||
case SemIR::CoreInterface::MulWith:
|
||||
case SemIR::CoreInterface::Negate:
|
||||
case SemIR::CoreInterface::OrderedWith:
|
||||
case SemIR::CoreInterface::SubAssignWith:
|
||||
case SemIR::CoreInterface::SubWith:
|
||||
case SemIR::CoreInterface::Unknown:
|
||||
|
||||
@@ -0,0 +1,833 @@
|
||||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon
|
||||
// EXTRA-ARGS: --target=x86_64-linux-gnu --clang-arg=-std=c++20
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/operators/eq_with.carbon
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/operators/eq_with.carbon
|
||||
|
||||
// --- returns_bool.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Cpp inline '''c++
|
||||
struct EqualityComparable {
|
||||
auto operator==(EqualityComparable const&) const -> bool;
|
||||
auto operator!=(EqualityComparable const&) const -> bool;
|
||||
};
|
||||
''';
|
||||
|
||||
fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
//@dump-sem-ir-begin
|
||||
x == y;
|
||||
x != y;
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
fn Test(equality_comparable: Cpp.EqualityComparable) {
|
||||
EqWith(equality_comparable, equality_comparable);
|
||||
}
|
||||
|
||||
// --- cross_type_equality.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Cpp inline '''c++
|
||||
struct B1;
|
||||
struct A1 {
|
||||
auto operator==(B1) const -> bool;
|
||||
auto operator!=(B1) const -> bool;
|
||||
};
|
||||
struct B1 {
|
||||
auto operator==(A1) const -> bool;
|
||||
auto operator!=(A1) const -> bool;
|
||||
};
|
||||
|
||||
struct B2;
|
||||
struct A2 {
|
||||
};
|
||||
struct B2 {
|
||||
auto operator==(A2) const -> bool;
|
||||
auto operator!=(A2) const -> bool;
|
||||
};
|
||||
|
||||
struct B3;
|
||||
struct A3 {
|
||||
auto operator==(B3) const -> bool;
|
||||
friend auto operator==(B3, A3) -> bool;
|
||||
};
|
||||
struct B3 {
|
||||
auto operator!=(A3) const -> bool;
|
||||
friend auto operator!=(A3, B3) -> bool;
|
||||
};
|
||||
''';
|
||||
|
||||
fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
//@dump-sem-ir-begin
|
||||
x == y;
|
||||
x != y;
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
fn Test(a1: Cpp.A1, b1: Cpp.B1,
|
||||
a2: Cpp.A2, b2: Cpp.B2,
|
||||
a3: Cpp.A3, b3: Cpp.B3) {
|
||||
EqWith(a1, b1);
|
||||
EqWith(b1, a1);
|
||||
|
||||
EqWith(b2, a2);
|
||||
|
||||
EqWith(a3, b3);
|
||||
EqWith(b3, a3);
|
||||
}
|
||||
|
||||
// --- fail_todo_returns_boolish.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Cpp inline '''c++
|
||||
struct NeqBoolish {
|
||||
auto operator==(NeqBoolish) const -> bool;
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+9]]:8: error: cannot implicitly convert expression of type `i32` to `bool` [ConversionFailure]
|
||||
// CHECK:STDERR: auto operator!=(NeqBoolish) const -> int;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+6]]:8: note: type `i32` does not implement interface `Core.ImplicitAs(bool)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: auto operator!=(NeqBoolish) const -> int;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: {{.*}}/prelude/operators/comparison.carbon:20:3: note: while building thunk to match the signature of this function [ThunkSignature]
|
||||
// CHECK:STDERR: fn NotEqual[self: Self](other: Other) -> bool;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
auto operator!=(NeqBoolish) const -> int;
|
||||
};
|
||||
|
||||
struct EqBoolish {
|
||||
auto operator==(EqBoolish) const -> int*;
|
||||
auto operator!=(EqBoolish) const -> bool;
|
||||
};
|
||||
|
||||
struct BothBoolish {
|
||||
enum Result {
|
||||
False,
|
||||
True,
|
||||
};
|
||||
auto operator==(BothBoolish) const -> Result;
|
||||
auto operator!=(BothBoolish) const -> Result;
|
||||
};
|
||||
''';
|
||||
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+43]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-18]]:8: error: cannot implicitly convert expression of type `Core.Optional(i32* as Core.OptionalStorage)` to `bool` [ConversionFailure]
|
||||
// CHECK:STDERR: auto operator==(EqBoolish) const -> int*;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-21]]:8: note: type `Core.Optional(i32* as Core.OptionalStorage)` does not implement interface `Core.ImplicitAs(bool)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: auto operator==(EqBoolish) const -> int*;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: {{.*}}/prelude/operators/comparison.carbon:19:3: note: while building thunk to match the signature of this function [ThunkSignature]
|
||||
// CHECK:STDERR: fn Equal[self: Self](other: Other) -> bool;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+30]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-22]]:8: error: cannot implicitly convert expression of type `Cpp.Result` to `bool` [ConversionFailure]
|
||||
// CHECK:STDERR: auto operator==(BothBoolish) const -> Result;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-25]]:8: note: type `Cpp.Result` does not implement interface `Core.ImplicitAs(bool)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: auto operator==(BothBoolish) const -> Result;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: {{.*}}/prelude/operators/comparison.carbon:19:3: note: while building thunk to match the signature of this function [ThunkSignature]
|
||||
// CHECK:STDERR: fn Equal[self: Self](other: Other) -> bool;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+17]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-34]]:8: error: cannot implicitly convert expression of type `Cpp.Result` to `bool` [ConversionFailure]
|
||||
// CHECK:STDERR: auto operator!=(BothBoolish) const -> Result;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE-37]]:8: note: type `Cpp.Result` does not implement interface `Core.ImplicitAs(bool)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: auto operator!=(BothBoolish) const -> Result;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: {{.*}}/prelude/operators/comparison.carbon:20:3: note: while building thunk to match the signature of this function [ThunkSignature]
|
||||
// CHECK:STDERR: fn NotEqual[self: Self](other: Other) -> bool;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_returns_boolish.carbon:[[@LINE+4]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
x == y;
|
||||
x != y;
|
||||
}
|
||||
|
||||
fn Test(neq_boolish: Cpp.NeqBoolish,
|
||||
eq_boolish: Cpp.EqBoolish,
|
||||
both_boolish: Cpp.BothBoolish) {
|
||||
EqWith(neq_boolish, neq_boolish);
|
||||
|
||||
EqWith(eq_boolish, eq_boolish);
|
||||
|
||||
EqWith(both_boolish, both_boolish);
|
||||
}
|
||||
|
||||
// --- fail_todo_comparison_rewrites.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Cpp inline '''c++
|
||||
struct DefaultEqOnly {
|
||||
public:
|
||||
auto operator==(const DefaultEqOnly&) const -> bool = default;
|
||||
};
|
||||
|
||||
struct OnlyEqDeclared {
|
||||
public:
|
||||
auto operator==(OnlyEqDeclared) const -> bool;
|
||||
};
|
||||
''';
|
||||
|
||||
fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
x == y;
|
||||
x != y;
|
||||
}
|
||||
|
||||
fn Test(default_eq_only: Cpp.DefaultEqOnly,
|
||||
// CHECK:STDERR: fail_todo_comparison_rewrites.carbon:[[@LINE+4]]:33: error: member name `DefaultSpaceshipOnly` not found in `Cpp` [MemberNameNotFoundInInstScope]
|
||||
// CHECK:STDERR: default_spaceship_only: Cpp.DefaultSpaceshipOnly,
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
default_spaceship_only: Cpp.DefaultSpaceshipOnly,
|
||||
only_eq_declared: Cpp.OnlyEqDeclared) {
|
||||
// CHECK:STDERR: fail_todo_comparison_rewrites.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator!= using operator== is not supported` [SemanticsTodo]
|
||||
// CHECK:STDERR: EqWith(default_eq_only, default_eq_only);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_comparison_rewrites.carbon:[[@LINE-15]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(default_eq_only, default_eq_only);
|
||||
|
||||
EqWith(default_spaceship_only, default_spaceship_only);
|
||||
|
||||
// CHECK:STDERR: fail_todo_comparison_rewrites.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator!= using operator== is not supported` [SemanticsTodo]
|
||||
// CHECK:STDERR: EqWith(only_eq_declared, only_eq_declared);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_comparison_rewrites.carbon:[[@LINE-26]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(only_eq_declared, only_eq_declared);
|
||||
}
|
||||
|
||||
// --- fail_never_valid.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Cpp inline '''c++
|
||||
struct OnlyNeq {
|
||||
auto operator!=(OnlyNeq) const -> bool;
|
||||
};
|
||||
|
||||
struct NoRelevantMembers {};
|
||||
|
||||
struct EqReturnsVoid {
|
||||
auto operator==(EqReturnsVoid) const -> void;
|
||||
auto operator!=(EqReturnsVoid) const -> bool;
|
||||
};
|
||||
|
||||
struct NeqReturnsVoid {
|
||||
auto operator==(NeqReturnsVoid) const -> bool;
|
||||
auto operator!=(NeqReturnsVoid) const -> void;
|
||||
};
|
||||
|
||||
struct DeletedNeq {
|
||||
auto operator==(DeletedNeq) const -> bool;
|
||||
auto operator!=(DeletedNeq) const -> bool = delete;
|
||||
};
|
||||
|
||||
struct NonConstEq {
|
||||
auto operator==(NonConstEq) -> bool;
|
||||
auto operator!=(NonConstEq) const -> bool;
|
||||
};
|
||||
|
||||
struct A2 {};
|
||||
struct B2 {
|
||||
auto operator==(A2) const -> bool;
|
||||
auto operator!=(A2) const -> bool;
|
||||
};
|
||||
''';
|
||||
|
||||
fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
x == y;
|
||||
x != y;
|
||||
}
|
||||
|
||||
fn Test(only_neq: Cpp.OnlyNeq,
|
||||
no_relevant_members: Cpp.NoRelevantMembers,
|
||||
eq_returns_void: Cpp.EqReturnsVoid,
|
||||
neq_returns_void: Cpp.NeqReturnsVoid,
|
||||
deleted_neq: Cpp.DeletedNeq,
|
||||
non_const_eq: Cpp.NonConstEq,
|
||||
a2: Cpp.A2, b2: Cpp.B2) {
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.OnlyNeq` into type implementing `Core.EqWith(Cpp.OnlyNeq)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: EqWith(only_neq, only_neq);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE-15]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(only_neq, only_neq);
|
||||
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE+8]]:10: error: name `only_non_default_spaceship` not found [NameNotFound]
|
||||
// CHECK:STDERR: EqWith(only_non_default_spaceship, only_non_default_spaceship);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE+4]]:38: error: name `only_non_default_spaceship` not found [NameNotFound]
|
||||
// CHECK:STDERR: EqWith(only_non_default_spaceship, only_non_default_spaceship);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(only_non_default_spaceship, only_non_default_spaceship);
|
||||
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoRelevantMembers` into type implementing `Core.EqWith(Cpp.NoRelevantMembers)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: EqWith(no_relevant_members, no_relevant_members);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE-34]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(no_relevant_members, no_relevant_members);
|
||||
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.EqReturnsVoid` into type implementing `Core.EqWith(Cpp.EqReturnsVoid)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: EqWith(eq_returns_void, eq_returns_void);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE-43]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(eq_returns_void, eq_returns_void);
|
||||
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NeqReturnsVoid` into type implementing `Core.EqWith(Cpp.NeqReturnsVoid)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: EqWith(neq_returns_void, neq_returns_void);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE-52]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(neq_returns_void, neq_returns_void);
|
||||
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE+13]]:34: error: overload resolution selected deleted operator '!=' [CppInteropParseError]
|
||||
// CHECK:STDERR: 109 | EqWith(deleted_neq, deleted_neq);
|
||||
// CHECK:STDERR: | ^
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE-77]]:8: note: candidate function [CppInteropParseNote]
|
||||
// CHECK:STDERR: 22 | auto operator==(DeletedNeq) const -> bool;
|
||||
// CHECK:STDERR: | ^
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE-79]]:8: note: candidate function has been explicitly deleted [CppInteropParseNote]
|
||||
// CHECK:STDERR: 23 | auto operator!=(DeletedNeq) const -> bool = delete;
|
||||
// CHECK:STDERR: | ^
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE-67]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(deleted_neq, deleted_neq);
|
||||
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator!= using operator== is not supported` [SemanticsTodo]
|
||||
// CHECK:STDERR: EqWith(non_const_eq, non_const_eq);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE-76]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(non_const_eq, non_const_eq);
|
||||
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.A2` into type implementing `Core.EqWith(Cpp.B2)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: EqWith(a2, b2);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE-85]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(a2, b2);
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- returns_bool.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Other: type = symbolic_binding Other, 0 [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.type.411e55.1: type = facet_type <@EqWith.1, @EqWith.1(%Other)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.75d78e.1: %EqWith.type.411e55.1 = symbolic_binding Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.14b5be.1: type = assoc_entity_type @EqWith.1, @EqWith.1(%Other) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.e50259.1: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%Other, %Self.75d78e.1) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.ec9479.1: %EqWith.WithSelf.NotEqual.type.e50259.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.838401.1: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%Other, %Self.75d78e.1) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.dd9722.1: %EqWith.WithSelf.Equal.type.838401.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.type.411e55.2: type = facet_type <@EqWith.1, @EqWith.1(%U)> [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.548: type = pattern_type %EqWith.type.411e55.2 [symbolic]
|
||||
// CHECK:STDOUT: %T: %EqWith.type.411e55.2 = symbolic_binding T, 1 [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.14b5be.2: type = assoc_entity_type @EqWith.1, @EqWith.1(%U) [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.8eade4.2: %EqWith.assoc_type.14b5be.2 = assoc_entity element0, imports.%Core.import_ref.30a [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.c6914e.2: %EqWith.assoc_type.14b5be.2 = assoc_entity element1, imports.%Core.import_ref.b99 [symbolic]
|
||||
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.5dd0fd.2: type = pattern_type %T.as_type [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.51d1c4.2: type = pattern_type %U [symbolic]
|
||||
// CHECK:STDOUT: %require_complete.b51: <witness> = require_complete_type %EqWith.type.411e55.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.9e2: %EqWith.assoc_type.14b5be.1 = assoc_entity element0, imports.%Core.import_ref.27d [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness: <witness> = lookup_impl_witness %T, @EqWith.1, @EqWith.1(%U) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.838401.3: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U, %T) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.e50259.3: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U, %T) [symbolic]
|
||||
// CHECK:STDOUT: %.5a0: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.838401.3, %T [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem0: %.5a0 = impl_witness_access %EqWith.lookup_impl_witness, element0 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.9eb: <specific function> = specific_impl_function %impl.elem0, @EqWith.WithSelf.Equal(%U, %T) [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.641: %EqWith.assoc_type.14b5be.1 = assoc_entity element1, imports.%Core.import_ref.6e8 [symbolic]
|
||||
// CHECK:STDOUT: %.fc6: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.e50259.3, %T [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem1: %.fc6 = impl_witness_access %EqWith.lookup_impl_witness, element1 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.494: <specific function> = specific_impl_function %impl.elem1, @EqWith.WithSelf.NotEqual(%U, %T) [symbolic]
|
||||
// CHECK:STDOUT: %EqualityComparable: type = class_type @EqualityComparable [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.aed: type = pattern_type %EqualityComparable [concrete]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
|
||||
// CHECK:STDOUT: %EqWith.type.1bd: type = facet_type <@EqWith.1, @EqWith.1(%EqualityComparable)> [concrete]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.062: type = assoc_entity_type @EqWith.1, @EqWith.1(%EqualityComparable) [concrete]
|
||||
// CHECK:STDOUT: %assoc0.fca: %EqWith.assoc_type.062 = assoc_entity element0, imports.%Core.import_ref.30a [concrete]
|
||||
// CHECK:STDOUT: %assoc1.1e1: %EqWith.assoc_type.062 = assoc_entity element1, imports.%Core.import_ref.b99 [concrete]
|
||||
// CHECK:STDOUT: %EqualityComparable.Equal.type: type = fn_type @EqualityComparable.Equal [concrete]
|
||||
// CHECK:STDOUT: %EqualityComparable.Equal: %EqualityComparable.Equal.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %EqualityComparable.NotEqual.type: type = fn_type @EqualityComparable.NotEqual [concrete]
|
||||
// CHECK:STDOUT: %EqualityComparable.NotEqual: %EqualityComparable.NotEqual.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %custom_witness.5b7: <witness> = custom_witness (%EqualityComparable.Equal, %EqualityComparable.NotEqual), @EqWith.1, @EqWith.1(%EqualityComparable) [concrete]
|
||||
// CHECK:STDOUT: %EqWith.facet.11c: %EqWith.type.1bd = facet_value %EqualityComparable, (%custom_witness.5b7) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.3f6: type = pattern_type %EqWith.type.1bd [concrete]
|
||||
// CHECK:STDOUT: %complete_type.22f: <witness> = complete_type_witness %EqWith.type.1bd [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.19e: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%EqualityComparable, %EqWith.facet.11c) [concrete]
|
||||
// CHECK:STDOUT: %.160: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.19e, %EqWith.facet.11c [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.49b: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%EqualityComparable, %EqWith.facet.11c) [concrete]
|
||||
// CHECK:STDOUT: %.199: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.49b, %EqWith.facet.11c [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core.import_ref.3e8: @EqWith.WithSelf.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%assoc0 (constants.%assoc0.9e2)]
|
||||
// CHECK:STDOUT: %Core.import_ref.c1e: @EqWith.WithSelf.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%assoc1 (constants.%assoc1.641)]
|
||||
// CHECK:STDOUT: %Core.import_ref.b99: @EqWith.WithSelf.%EqWith.WithSelf.NotEqual.type (%EqWith.WithSelf.NotEqual.type.e50259.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%EqWith.WithSelf.NotEqual (constants.%EqWith.WithSelf.NotEqual.ec9479.1)]
|
||||
// CHECK:STDOUT: %Core.import_ref.30a: @EqWith.WithSelf.%EqWith.WithSelf.Equal.type (%EqWith.WithSelf.Equal.type.838401.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%EqWith.WithSelf.Equal (constants.%EqWith.WithSelf.Equal.dd9722.1)]
|
||||
// CHECK:STDOUT: %Core.import_ref.27d = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.6e8 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @EqWith.loc11(%U.loc11_12.2: type, %T.loc11_22.2: @EqWith.loc11.%EqWith.type.loc11_38.1 (%EqWith.type.411e55.2)) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %require_complete.loc13: <witness> = require_complete_type %EqWith.type.loc11_38.1 [symbolic = %require_complete.loc13 (constants.%require_complete.b51)]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type: type = assoc_entity_type @EqWith.1, @EqWith.1(%U.loc11_12.1) [symbolic = %EqWith.assoc_type (constants.%EqWith.assoc_type.14b5be.2)]
|
||||
// CHECK:STDOUT: %assoc0: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = assoc_entity element0, imports.%Core.import_ref.30a [symbolic = %assoc0 (constants.%assoc0.8eade4.2)]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U.loc11_12.1, %T.loc11_22.1) [symbolic = %EqWith.WithSelf.Equal.type (constants.%EqWith.WithSelf.Equal.type.838401.3)]
|
||||
// CHECK:STDOUT: %.loc13_5.2: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type, %T.loc11_22.1 [symbolic = %.loc13_5.2 (constants.%.5a0)]
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc11_22.1, @EqWith.1, @EqWith.1(%U.loc11_12.1) [symbolic = %EqWith.lookup_impl_witness (constants.%EqWith.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_5.2: @EqWith.loc11.%.loc13_5.2 (%.5a0) = impl_witness_access %EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_5.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc13_5.2: <specific function> = specific_impl_function %impl.elem0.loc13_5.2, @EqWith.WithSelf.Equal(%U.loc11_12.1, %T.loc11_22.1) [symbolic = %specific_impl_fn.loc13_5.2 (constants.%specific_impl_fn.9eb)]
|
||||
// CHECK:STDOUT: %assoc1: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = assoc_entity element1, imports.%Core.import_ref.b99 [symbolic = %assoc1 (constants.%assoc1.c6914e.2)]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U.loc11_12.1, %T.loc11_22.1) [symbolic = %EqWith.WithSelf.NotEqual.type (constants.%EqWith.WithSelf.NotEqual.type.e50259.3)]
|
||||
// CHECK:STDOUT: %.loc14_5.2: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type, %T.loc11_22.1 [symbolic = %.loc14_5.2 (constants.%.fc6)]
|
||||
// CHECK:STDOUT: %impl.elem1.loc14_5.2: @EqWith.loc11.%.loc14_5.2 (%.fc6) = impl_witness_access %EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_5.2 (constants.%impl.elem1)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc14_5.2: <specific function> = specific_impl_function %impl.elem1.loc14_5.2, @EqWith.WithSelf.NotEqual(%U.loc11_12.1, %T.loc11_22.1) [symbolic = %specific_impl_fn.loc14_5.2 (constants.%specific_impl_fn.494)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%x.param: @EqWith.loc11.%T.as_type.loc11_44.1 (%T.as_type), %y.param: @EqWith.loc11.%U.loc11_12.1 (%U)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref.loc13: @EqWith.loc11.%T.as_type.loc11_44.1 (%T.as_type) = name_ref x, %x
|
||||
// CHECK:STDOUT: %y.ref.loc13: @EqWith.loc11.%U.loc11_12.1 (%U) = name_ref y, %y
|
||||
// CHECK:STDOUT: %EqWith.type.loc13: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc11_38.1 (constants.%EqWith.type.411e55.2)]
|
||||
// CHECK:STDOUT: %.loc13_5.1: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = specific_constant imports.%Core.import_ref.3e8, @EqWith.WithSelf(constants.%U, constants.%Self.75d78e.1) [symbolic = %assoc0 (constants.%assoc0.8eade4.2)]
|
||||
// CHECK:STDOUT: %Equal.ref: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = name_ref Equal, %.loc13_5.1 [symbolic = %assoc0 (constants.%assoc0.8eade4.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_5.1: @EqWith.loc11.%.loc13_5.2 (%.5a0) = impl_witness_access constants.%EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_5.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %bound_method.loc13_5.1: <bound method> = bound_method %x.ref.loc13, %impl.elem0.loc13_5.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc13_5.1: <specific function> = specific_impl_function %impl.elem0.loc13_5.1, @EqWith.WithSelf.Equal(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc13_5.2 (constants.%specific_impl_fn.9eb)]
|
||||
// CHECK:STDOUT: %bound_method.loc13_5.2: <bound method> = bound_method %x.ref.loc13, %specific_impl_fn.loc13_5.1
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.call: init bool = call %bound_method.loc13_5.2(%x.ref.loc13, %y.ref.loc13)
|
||||
// CHECK:STDOUT: %x.ref.loc14: @EqWith.loc11.%T.as_type.loc11_44.1 (%T.as_type) = name_ref x, %x
|
||||
// CHECK:STDOUT: %y.ref.loc14: @EqWith.loc11.%U.loc11_12.1 (%U) = name_ref y, %y
|
||||
// CHECK:STDOUT: %EqWith.type.loc14: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc11_38.1 (constants.%EqWith.type.411e55.2)]
|
||||
// CHECK:STDOUT: %.loc14_5.1: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = specific_constant imports.%Core.import_ref.c1e, @EqWith.WithSelf(constants.%U, constants.%Self.75d78e.1) [symbolic = %assoc1 (constants.%assoc1.c6914e.2)]
|
||||
// CHECK:STDOUT: %NotEqual.ref: @EqWith.loc11.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = name_ref NotEqual, %.loc14_5.1 [symbolic = %assoc1 (constants.%assoc1.c6914e.2)]
|
||||
// CHECK:STDOUT: %impl.elem1.loc14_5.1: @EqWith.loc11.%.loc14_5.2 (%.fc6) = impl_witness_access constants.%EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_5.2 (constants.%impl.elem1)]
|
||||
// CHECK:STDOUT: %bound_method.loc14_5.1: <bound method> = bound_method %x.ref.loc14, %impl.elem1.loc14_5.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc14_5.1: <specific function> = specific_impl_function %impl.elem1.loc14_5.1, @EqWith.WithSelf.NotEqual(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc14_5.2 (constants.%specific_impl_fn.494)]
|
||||
// CHECK:STDOUT: %bound_method.loc14_5.2: <bound method> = bound_method %x.ref.loc14, %specific_impl_fn.loc14_5.1
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.call: init bool = call %bound_method.loc14_5.2(%x.ref.loc14, %y.ref.loc14)
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @EqWith.loc11(constants.%U, constants.%T) {
|
||||
// CHECK:STDOUT: %U.loc11_12.1 => constants.%U
|
||||
// CHECK:STDOUT: %EqWith.type.loc11_38.1 => constants.%EqWith.type.411e55.2
|
||||
// CHECK:STDOUT: %T.loc11_22.1 => constants.%T
|
||||
// CHECK:STDOUT: %pattern_type.loc11_22 => constants.%pattern_type.548
|
||||
// CHECK:STDOUT: %T.as_type.loc11_44.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %pattern_type.loc11_42 => constants.%pattern_type.5dd0fd.2
|
||||
// CHECK:STDOUT: %pattern_type.loc11_48 => constants.%pattern_type.51d1c4.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @EqWith.loc11(constants.%EqualityComparable, constants.%EqWith.facet.11c) {
|
||||
// CHECK:STDOUT: %U.loc11_12.1 => constants.%EqualityComparable
|
||||
// CHECK:STDOUT: %EqWith.type.loc11_38.1 => constants.%EqWith.type.1bd
|
||||
// CHECK:STDOUT: %T.loc11_22.1 => constants.%EqWith.facet.11c
|
||||
// CHECK:STDOUT: %pattern_type.loc11_22 => constants.%pattern_type.3f6
|
||||
// CHECK:STDOUT: %T.as_type.loc11_44.1 => constants.%EqualityComparable
|
||||
// CHECK:STDOUT: %pattern_type.loc11_42 => constants.%pattern_type.aed
|
||||
// CHECK:STDOUT: %pattern_type.loc11_48 => constants.%pattern_type.aed
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc11_42 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc11_48 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc13 => constants.%complete_type.22f
|
||||
// CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.062
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.fca
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type => constants.%EqWith.WithSelf.Equal.type.19e
|
||||
// CHECK:STDOUT: %.loc13_5.2 => constants.%.160
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness => constants.%custom_witness.5b7
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_5.2 => constants.%EqualityComparable.Equal
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc13_5.2 => constants.%EqualityComparable.Equal
|
||||
// CHECK:STDOUT: %assoc1 => constants.%assoc1.1e1
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type => constants.%EqWith.WithSelf.NotEqual.type.49b
|
||||
// CHECK:STDOUT: %.loc14_5.2 => constants.%.199
|
||||
// CHECK:STDOUT: %impl.elem1.loc14_5.2 => constants.%EqualityComparable.NotEqual
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc14_5.2 => constants.%EqualityComparable.NotEqual
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- cross_type_equality.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Other: type = symbolic_binding Other, 0 [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.type.411e55.1: type = facet_type <@EqWith.1, @EqWith.1(%Other)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.75d78e.1: %EqWith.type.411e55.1 = symbolic_binding Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.14b5be.1: type = assoc_entity_type @EqWith.1, @EqWith.1(%Other) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.e50259.1: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%Other, %Self.75d78e.1) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.ec9479.1: %EqWith.WithSelf.NotEqual.type.e50259.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.838401.1: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%Other, %Self.75d78e.1) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.dd9722.1: %EqWith.WithSelf.Equal.type.838401.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.type.411e55.2: type = facet_type <@EqWith.1, @EqWith.1(%U)> [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.548: type = pattern_type %EqWith.type.411e55.2 [symbolic]
|
||||
// CHECK:STDOUT: %T: %EqWith.type.411e55.2 = symbolic_binding T, 1 [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.14b5be.2: type = assoc_entity_type @EqWith.1, @EqWith.1(%U) [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.8eade4.2: %EqWith.assoc_type.14b5be.2 = assoc_entity element0, imports.%Core.import_ref.30a [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.c6914e.2: %EqWith.assoc_type.14b5be.2 = assoc_entity element1, imports.%Core.import_ref.b99 [symbolic]
|
||||
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.5dd0fd.2: type = pattern_type %T.as_type [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.51d1c4.2: type = pattern_type %U [symbolic]
|
||||
// CHECK:STDOUT: %require_complete.b51: <witness> = require_complete_type %EqWith.type.411e55.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.9e2: %EqWith.assoc_type.14b5be.1 = assoc_entity element0, imports.%Core.import_ref.27d [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness: <witness> = lookup_impl_witness %T, @EqWith.1, @EqWith.1(%U) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.838401.3: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U, %T) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.e50259.3: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U, %T) [symbolic]
|
||||
// CHECK:STDOUT: %.5a0: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.838401.3, %T [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem0: %.5a0 = impl_witness_access %EqWith.lookup_impl_witness, element0 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.9eb: <specific function> = specific_impl_function %impl.elem0, @EqWith.WithSelf.Equal(%U, %T) [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.641: %EqWith.assoc_type.14b5be.1 = assoc_entity element1, imports.%Core.import_ref.6e8 [symbolic]
|
||||
// CHECK:STDOUT: %.fc6: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.e50259.3, %T [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem1: %.fc6 = impl_witness_access %EqWith.lookup_impl_witness, element1 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.494: <specific function> = specific_impl_function %impl.elem1, @EqWith.WithSelf.NotEqual(%U, %T) [symbolic]
|
||||
// CHECK:STDOUT: %A1: type = class_type @A1 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.57d: type = pattern_type %A1 [concrete]
|
||||
// CHECK:STDOUT: %B1: type = class_type @B1 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.c01: type = pattern_type %B1 [concrete]
|
||||
// CHECK:STDOUT: %A2: type = class_type @A2 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.6ac: type = pattern_type %A2 [concrete]
|
||||
// CHECK:STDOUT: %B2: type = class_type @B2 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.fe2: type = pattern_type %B2 [concrete]
|
||||
// CHECK:STDOUT: %A3: type = class_type @A3 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.bb4: type = pattern_type %A3 [concrete]
|
||||
// CHECK:STDOUT: %B3: type = class_type @B3 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.b85: type = pattern_type %B3 [concrete]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
|
||||
// CHECK:STDOUT: %EqWith.type.c2c: type = facet_type <@EqWith.1, @EqWith.1(%B1)> [concrete]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.e48: type = assoc_entity_type @EqWith.1, @EqWith.1(%B1) [concrete]
|
||||
// CHECK:STDOUT: %assoc0.d45: %EqWith.assoc_type.e48 = assoc_entity element0, imports.%Core.import_ref.30a [concrete]
|
||||
// CHECK:STDOUT: %assoc1.6ec: %EqWith.assoc_type.e48 = assoc_entity element1, imports.%Core.import_ref.b99 [concrete]
|
||||
// CHECK:STDOUT: %A1.Equal.type: type = fn_type @A1.Equal [concrete]
|
||||
// CHECK:STDOUT: %A1.Equal: %A1.Equal.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %A1.NotEqual.type: type = fn_type @A1.NotEqual [concrete]
|
||||
// CHECK:STDOUT: %A1.NotEqual: %A1.NotEqual.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %custom_witness.622: <witness> = custom_witness (%A1.Equal, %A1.NotEqual), @EqWith.1, @EqWith.1(%B1) [concrete]
|
||||
// CHECK:STDOUT: %EqWith.facet.50f: %EqWith.type.c2c = facet_value %A1, (%custom_witness.622) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.385: type = pattern_type %EqWith.type.c2c [concrete]
|
||||
// CHECK:STDOUT: %EqWith.type.31c: type = facet_type <@EqWith.1, @EqWith.1(%A1)> [concrete]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.ef3: type = assoc_entity_type @EqWith.1, @EqWith.1(%A1) [concrete]
|
||||
// CHECK:STDOUT: %assoc0.90d: %EqWith.assoc_type.ef3 = assoc_entity element0, imports.%Core.import_ref.30a [concrete]
|
||||
// CHECK:STDOUT: %assoc1.f70: %EqWith.assoc_type.ef3 = assoc_entity element1, imports.%Core.import_ref.b99 [concrete]
|
||||
// CHECK:STDOUT: %B1.Equal.type: type = fn_type @B1.Equal [concrete]
|
||||
// CHECK:STDOUT: %B1.Equal: %B1.Equal.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %B1.NotEqual.type: type = fn_type @B1.NotEqual [concrete]
|
||||
// CHECK:STDOUT: %B1.NotEqual: %B1.NotEqual.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %custom_witness.b72: <witness> = custom_witness (%B1.Equal, %B1.NotEqual), @EqWith.1, @EqWith.1(%A1) [concrete]
|
||||
// CHECK:STDOUT: %EqWith.facet.888: %EqWith.type.31c = facet_value %B1, (%custom_witness.b72) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.a3e: type = pattern_type %EqWith.type.31c [concrete]
|
||||
// CHECK:STDOUT: %EqWith.type.61f: type = facet_type <@EqWith.1, @EqWith.1(%A2)> [concrete]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.c4f: type = assoc_entity_type @EqWith.1, @EqWith.1(%A2) [concrete]
|
||||
// CHECK:STDOUT: %assoc0.1b8: %EqWith.assoc_type.c4f = assoc_entity element0, imports.%Core.import_ref.30a [concrete]
|
||||
// CHECK:STDOUT: %assoc1.b76: %EqWith.assoc_type.c4f = assoc_entity element1, imports.%Core.import_ref.b99 [concrete]
|
||||
// CHECK:STDOUT: %B2.Equal.type: type = fn_type @B2.Equal [concrete]
|
||||
// CHECK:STDOUT: %B2.Equal: %B2.Equal.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %B2.NotEqual.type: type = fn_type @B2.NotEqual [concrete]
|
||||
// CHECK:STDOUT: %B2.NotEqual: %B2.NotEqual.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %custom_witness.009: <witness> = custom_witness (%B2.Equal, %B2.NotEqual), @EqWith.1, @EqWith.1(%A2) [concrete]
|
||||
// CHECK:STDOUT: %EqWith.facet.ae0: %EqWith.type.61f = facet_value %B2, (%custom_witness.009) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.c70: type = pattern_type %EqWith.type.61f [concrete]
|
||||
// CHECK:STDOUT: %EqWith.type.87c: type = facet_type <@EqWith.1, @EqWith.1(%B3)> [concrete]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.717: type = assoc_entity_type @EqWith.1, @EqWith.1(%B3) [concrete]
|
||||
// CHECK:STDOUT: %assoc0.164: %EqWith.assoc_type.717 = assoc_entity element0, imports.%Core.import_ref.30a [concrete]
|
||||
// CHECK:STDOUT: %assoc1.d2d: %EqWith.assoc_type.717 = assoc_entity element1, imports.%Core.import_ref.b99 [concrete]
|
||||
// CHECK:STDOUT: %A3.Equal.type: type = fn_type @A3.Equal [concrete]
|
||||
// CHECK:STDOUT: %A3.Equal: %A3.Equal.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [concrete]
|
||||
// CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %custom_witness.bef: <witness> = custom_witness (%A3.Equal, %NotEqual), @EqWith.1, @EqWith.1(%B3) [concrete]
|
||||
// CHECK:STDOUT: %EqWith.facet.745: %EqWith.type.87c = facet_value %A3, (%custom_witness.bef) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.907: type = pattern_type %EqWith.type.87c [concrete]
|
||||
// CHECK:STDOUT: %EqWith.type.3bf: type = facet_type <@EqWith.1, @EqWith.1(%A3)> [concrete]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.813: type = assoc_entity_type @EqWith.1, @EqWith.1(%A3) [concrete]
|
||||
// CHECK:STDOUT: %assoc0.b23: %EqWith.assoc_type.813 = assoc_entity element0, imports.%Core.import_ref.30a [concrete]
|
||||
// CHECK:STDOUT: %assoc1.a0a: %EqWith.assoc_type.813 = assoc_entity element1, imports.%Core.import_ref.b99 [concrete]
|
||||
// CHECK:STDOUT: %Equal.type: type = fn_type @Equal [concrete]
|
||||
// CHECK:STDOUT: %Equal: %Equal.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %B3.NotEqual.type: type = fn_type @B3.NotEqual [concrete]
|
||||
// CHECK:STDOUT: %B3.NotEqual: %B3.NotEqual.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %custom_witness.7b9: <witness> = custom_witness (%Equal, %B3.NotEqual), @EqWith.1, @EqWith.1(%A3) [concrete]
|
||||
// CHECK:STDOUT: %EqWith.facet.fcb: %EqWith.type.3bf = facet_value %B3, (%custom_witness.7b9) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.2ce: type = pattern_type %EqWith.type.3bf [concrete]
|
||||
// CHECK:STDOUT: %complete_type.30b: <witness> = complete_type_witness %EqWith.type.c2c [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.0bc: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%B1, %EqWith.facet.50f) [concrete]
|
||||
// CHECK:STDOUT: %.555: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.0bc, %EqWith.facet.50f [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.c48: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%B1, %EqWith.facet.50f) [concrete]
|
||||
// CHECK:STDOUT: %.dce: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.c48, %EqWith.facet.50f [concrete]
|
||||
// CHECK:STDOUT: %complete_type.76e: <witness> = complete_type_witness %EqWith.type.31c [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.d0a: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%A1, %EqWith.facet.888) [concrete]
|
||||
// CHECK:STDOUT: %.cca: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.d0a, %EqWith.facet.888 [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.be8: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%A1, %EqWith.facet.888) [concrete]
|
||||
// CHECK:STDOUT: %.5ca: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.be8, %EqWith.facet.888 [concrete]
|
||||
// CHECK:STDOUT: %complete_type.eee: <witness> = complete_type_witness %EqWith.type.61f [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.d00: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%A2, %EqWith.facet.ae0) [concrete]
|
||||
// CHECK:STDOUT: %.8aa: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.d00, %EqWith.facet.ae0 [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.d04: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%A2, %EqWith.facet.ae0) [concrete]
|
||||
// CHECK:STDOUT: %.d65: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.d04, %EqWith.facet.ae0 [concrete]
|
||||
// CHECK:STDOUT: %complete_type.b91: <witness> = complete_type_witness %EqWith.type.87c [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.9f4: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%B3, %EqWith.facet.745) [concrete]
|
||||
// CHECK:STDOUT: %.44f: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.9f4, %EqWith.facet.745 [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.500: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%B3, %EqWith.facet.745) [concrete]
|
||||
// CHECK:STDOUT: %.eb9: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.500, %EqWith.facet.745 [concrete]
|
||||
// CHECK:STDOUT: %complete_type.457: <witness> = complete_type_witness %EqWith.type.3bf [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.a93: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%A3, %EqWith.facet.fcb) [concrete]
|
||||
// CHECK:STDOUT: %.1ac: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.a93, %EqWith.facet.fcb [concrete]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.6b7: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%A3, %EqWith.facet.fcb) [concrete]
|
||||
// CHECK:STDOUT: %.ad8: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.6b7, %EqWith.facet.fcb [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core.import_ref.3e8: @EqWith.WithSelf.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%assoc0 (constants.%assoc0.9e2)]
|
||||
// CHECK:STDOUT: %Core.import_ref.c1e: @EqWith.WithSelf.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%assoc1 (constants.%assoc1.641)]
|
||||
// CHECK:STDOUT: %Core.import_ref.b99: @EqWith.WithSelf.%EqWith.WithSelf.NotEqual.type (%EqWith.WithSelf.NotEqual.type.e50259.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%EqWith.WithSelf.NotEqual (constants.%EqWith.WithSelf.NotEqual.ec9479.1)]
|
||||
// CHECK:STDOUT: %Core.import_ref.30a: @EqWith.WithSelf.%EqWith.WithSelf.Equal.type (%EqWith.WithSelf.Equal.type.838401.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%EqWith.WithSelf.Equal (constants.%EqWith.WithSelf.Equal.dd9722.1)]
|
||||
// CHECK:STDOUT: %Core.import_ref.27d = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.6e8 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @EqWith.loc34(%U.loc34_12.2: type, %T.loc34_22.2: @EqWith.loc34.%EqWith.type.loc34_38.1 (%EqWith.type.411e55.2)) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %require_complete.loc36: <witness> = require_complete_type %EqWith.type.loc34_38.1 [symbolic = %require_complete.loc36 (constants.%require_complete.b51)]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type: type = assoc_entity_type @EqWith.1, @EqWith.1(%U.loc34_12.1) [symbolic = %EqWith.assoc_type (constants.%EqWith.assoc_type.14b5be.2)]
|
||||
// CHECK:STDOUT: %assoc0: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = assoc_entity element0, imports.%Core.import_ref.30a [symbolic = %assoc0 (constants.%assoc0.8eade4.2)]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U.loc34_12.1, %T.loc34_22.1) [symbolic = %EqWith.WithSelf.Equal.type (constants.%EqWith.WithSelf.Equal.type.838401.3)]
|
||||
// CHECK:STDOUT: %.loc36_5.2: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type, %T.loc34_22.1 [symbolic = %.loc36_5.2 (constants.%.5a0)]
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc34_22.1, @EqWith.1, @EqWith.1(%U.loc34_12.1) [symbolic = %EqWith.lookup_impl_witness (constants.%EqWith.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc36_5.2: @EqWith.loc34.%.loc36_5.2 (%.5a0) = impl_witness_access %EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc36_5.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc36_5.2: <specific function> = specific_impl_function %impl.elem0.loc36_5.2, @EqWith.WithSelf.Equal(%U.loc34_12.1, %T.loc34_22.1) [symbolic = %specific_impl_fn.loc36_5.2 (constants.%specific_impl_fn.9eb)]
|
||||
// CHECK:STDOUT: %assoc1: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = assoc_entity element1, imports.%Core.import_ref.b99 [symbolic = %assoc1 (constants.%assoc1.c6914e.2)]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U.loc34_12.1, %T.loc34_22.1) [symbolic = %EqWith.WithSelf.NotEqual.type (constants.%EqWith.WithSelf.NotEqual.type.e50259.3)]
|
||||
// CHECK:STDOUT: %.loc37_5.2: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type, %T.loc34_22.1 [symbolic = %.loc37_5.2 (constants.%.fc6)]
|
||||
// CHECK:STDOUT: %impl.elem1.loc37_5.2: @EqWith.loc34.%.loc37_5.2 (%.fc6) = impl_witness_access %EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc37_5.2 (constants.%impl.elem1)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc37_5.2: <specific function> = specific_impl_function %impl.elem1.loc37_5.2, @EqWith.WithSelf.NotEqual(%U.loc34_12.1, %T.loc34_22.1) [symbolic = %specific_impl_fn.loc37_5.2 (constants.%specific_impl_fn.494)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%x.param: @EqWith.loc34.%T.as_type.loc34_44.1 (%T.as_type), %y.param: @EqWith.loc34.%U.loc34_12.1 (%U)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref.loc36: @EqWith.loc34.%T.as_type.loc34_44.1 (%T.as_type) = name_ref x, %x
|
||||
// CHECK:STDOUT: %y.ref.loc36: @EqWith.loc34.%U.loc34_12.1 (%U) = name_ref y, %y
|
||||
// CHECK:STDOUT: %EqWith.type.loc36: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc34_38.1 (constants.%EqWith.type.411e55.2)]
|
||||
// CHECK:STDOUT: %.loc36_5.1: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = specific_constant imports.%Core.import_ref.3e8, @EqWith.WithSelf(constants.%U, constants.%Self.75d78e.1) [symbolic = %assoc0 (constants.%assoc0.8eade4.2)]
|
||||
// CHECK:STDOUT: %Equal.ref: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = name_ref Equal, %.loc36_5.1 [symbolic = %assoc0 (constants.%assoc0.8eade4.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc36_5.1: @EqWith.loc34.%.loc36_5.2 (%.5a0) = impl_witness_access constants.%EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc36_5.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %bound_method.loc36_5.1: <bound method> = bound_method %x.ref.loc36, %impl.elem0.loc36_5.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc36_5.1: <specific function> = specific_impl_function %impl.elem0.loc36_5.1, @EqWith.WithSelf.Equal(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc36_5.2 (constants.%specific_impl_fn.9eb)]
|
||||
// CHECK:STDOUT: %bound_method.loc36_5.2: <bound method> = bound_method %x.ref.loc36, %specific_impl_fn.loc36_5.1
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.call: init bool = call %bound_method.loc36_5.2(%x.ref.loc36, %y.ref.loc36)
|
||||
// CHECK:STDOUT: %x.ref.loc37: @EqWith.loc34.%T.as_type.loc34_44.1 (%T.as_type) = name_ref x, %x
|
||||
// CHECK:STDOUT: %y.ref.loc37: @EqWith.loc34.%U.loc34_12.1 (%U) = name_ref y, %y
|
||||
// CHECK:STDOUT: %EqWith.type.loc37: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc34_38.1 (constants.%EqWith.type.411e55.2)]
|
||||
// CHECK:STDOUT: %.loc37_5.1: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = specific_constant imports.%Core.import_ref.c1e, @EqWith.WithSelf(constants.%U, constants.%Self.75d78e.1) [symbolic = %assoc1 (constants.%assoc1.c6914e.2)]
|
||||
// CHECK:STDOUT: %NotEqual.ref: @EqWith.loc34.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = name_ref NotEqual, %.loc37_5.1 [symbolic = %assoc1 (constants.%assoc1.c6914e.2)]
|
||||
// CHECK:STDOUT: %impl.elem1.loc37_5.1: @EqWith.loc34.%.loc37_5.2 (%.fc6) = impl_witness_access constants.%EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc37_5.2 (constants.%impl.elem1)]
|
||||
// CHECK:STDOUT: %bound_method.loc37_5.1: <bound method> = bound_method %x.ref.loc37, %impl.elem1.loc37_5.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc37_5.1: <specific function> = specific_impl_function %impl.elem1.loc37_5.1, @EqWith.WithSelf.NotEqual(constants.%U, constants.%T) [symbolic = %specific_impl_fn.loc37_5.2 (constants.%specific_impl_fn.494)]
|
||||
// CHECK:STDOUT: %bound_method.loc37_5.2: <bound method> = bound_method %x.ref.loc37, %specific_impl_fn.loc37_5.1
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.call: init bool = call %bound_method.loc37_5.2(%x.ref.loc37, %y.ref.loc37)
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @EqWith.loc34(constants.%U, constants.%T) {
|
||||
// CHECK:STDOUT: %U.loc34_12.1 => constants.%U
|
||||
// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.411e55.2
|
||||
// CHECK:STDOUT: %T.loc34_22.1 => constants.%T
|
||||
// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.548
|
||||
// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.5dd0fd.2
|
||||
// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.51d1c4.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @EqWith.loc34(constants.%B1, constants.%EqWith.facet.50f) {
|
||||
// CHECK:STDOUT: %U.loc34_12.1 => constants.%B1
|
||||
// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.c2c
|
||||
// CHECK:STDOUT: %T.loc34_22.1 => constants.%EqWith.facet.50f
|
||||
// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.385
|
||||
// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%A1
|
||||
// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.57d
|
||||
// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.c01
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc34_42 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc34_48 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc36 => constants.%complete_type.30b
|
||||
// CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.e48
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.d45
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type => constants.%EqWith.WithSelf.Equal.type.0bc
|
||||
// CHECK:STDOUT: %.loc36_5.2 => constants.%.555
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness => constants.%custom_witness.622
|
||||
// CHECK:STDOUT: %impl.elem0.loc36_5.2 => constants.%A1.Equal
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc36_5.2 => constants.%A1.Equal
|
||||
// CHECK:STDOUT: %assoc1 => constants.%assoc1.6ec
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type => constants.%EqWith.WithSelf.NotEqual.type.c48
|
||||
// CHECK:STDOUT: %.loc37_5.2 => constants.%.dce
|
||||
// CHECK:STDOUT: %impl.elem1.loc37_5.2 => constants.%A1.NotEqual
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc37_5.2 => constants.%A1.NotEqual
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @EqWith.loc34(constants.%A1, constants.%EqWith.facet.888) {
|
||||
// CHECK:STDOUT: %U.loc34_12.1 => constants.%A1
|
||||
// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.31c
|
||||
// CHECK:STDOUT: %T.loc34_22.1 => constants.%EqWith.facet.888
|
||||
// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.a3e
|
||||
// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%B1
|
||||
// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.c01
|
||||
// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.57d
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc34_42 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc34_48 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc36 => constants.%complete_type.76e
|
||||
// CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.ef3
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.90d
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type => constants.%EqWith.WithSelf.Equal.type.d0a
|
||||
// CHECK:STDOUT: %.loc36_5.2 => constants.%.cca
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness => constants.%custom_witness.b72
|
||||
// CHECK:STDOUT: %impl.elem0.loc36_5.2 => constants.%B1.Equal
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc36_5.2 => constants.%B1.Equal
|
||||
// CHECK:STDOUT: %assoc1 => constants.%assoc1.f70
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type => constants.%EqWith.WithSelf.NotEqual.type.be8
|
||||
// CHECK:STDOUT: %.loc37_5.2 => constants.%.5ca
|
||||
// CHECK:STDOUT: %impl.elem1.loc37_5.2 => constants.%B1.NotEqual
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc37_5.2 => constants.%B1.NotEqual
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @EqWith.loc34(constants.%A2, constants.%EqWith.facet.ae0) {
|
||||
// CHECK:STDOUT: %U.loc34_12.1 => constants.%A2
|
||||
// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.61f
|
||||
// CHECK:STDOUT: %T.loc34_22.1 => constants.%EqWith.facet.ae0
|
||||
// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.c70
|
||||
// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%B2
|
||||
// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.fe2
|
||||
// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.6ac
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc34_42 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc34_48 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc36 => constants.%complete_type.eee
|
||||
// CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.c4f
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.1b8
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type => constants.%EqWith.WithSelf.Equal.type.d00
|
||||
// CHECK:STDOUT: %.loc36_5.2 => constants.%.8aa
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness => constants.%custom_witness.009
|
||||
// CHECK:STDOUT: %impl.elem0.loc36_5.2 => constants.%B2.Equal
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc36_5.2 => constants.%B2.Equal
|
||||
// CHECK:STDOUT: %assoc1 => constants.%assoc1.b76
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type => constants.%EqWith.WithSelf.NotEqual.type.d04
|
||||
// CHECK:STDOUT: %.loc37_5.2 => constants.%.d65
|
||||
// CHECK:STDOUT: %impl.elem1.loc37_5.2 => constants.%B2.NotEqual
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc37_5.2 => constants.%B2.NotEqual
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @EqWith.loc34(constants.%B3, constants.%EqWith.facet.745) {
|
||||
// CHECK:STDOUT: %U.loc34_12.1 => constants.%B3
|
||||
// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.87c
|
||||
// CHECK:STDOUT: %T.loc34_22.1 => constants.%EqWith.facet.745
|
||||
// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.907
|
||||
// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%A3
|
||||
// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.bb4
|
||||
// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.b85
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc34_42 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc34_48 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc36 => constants.%complete_type.b91
|
||||
// CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.717
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.164
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type => constants.%EqWith.WithSelf.Equal.type.9f4
|
||||
// CHECK:STDOUT: %.loc36_5.2 => constants.%.44f
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness => constants.%custom_witness.bef
|
||||
// CHECK:STDOUT: %impl.elem0.loc36_5.2 => constants.%A3.Equal
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc36_5.2 => constants.%A3.Equal
|
||||
// CHECK:STDOUT: %assoc1 => constants.%assoc1.d2d
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type => constants.%EqWith.WithSelf.NotEqual.type.500
|
||||
// CHECK:STDOUT: %.loc37_5.2 => constants.%.eb9
|
||||
// CHECK:STDOUT: %impl.elem1.loc37_5.2 => constants.%NotEqual
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc37_5.2 => constants.%NotEqual
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @EqWith.loc34(constants.%A3, constants.%EqWith.facet.fcb) {
|
||||
// CHECK:STDOUT: %U.loc34_12.1 => constants.%A3
|
||||
// CHECK:STDOUT: %EqWith.type.loc34_38.1 => constants.%EqWith.type.3bf
|
||||
// CHECK:STDOUT: %T.loc34_22.1 => constants.%EqWith.facet.fcb
|
||||
// CHECK:STDOUT: %pattern_type.loc34_22 => constants.%pattern_type.2ce
|
||||
// CHECK:STDOUT: %T.as_type.loc34_44.1 => constants.%B3
|
||||
// CHECK:STDOUT: %pattern_type.loc34_42 => constants.%pattern_type.b85
|
||||
// CHECK:STDOUT: %pattern_type.loc34_48 => constants.%pattern_type.bb4
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc34_42 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc34_48 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc36 => constants.%complete_type.457
|
||||
// CHECK:STDOUT: %EqWith.assoc_type => constants.%EqWith.assoc_type.813
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.b23
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type => constants.%EqWith.WithSelf.Equal.type.a93
|
||||
// CHECK:STDOUT: %.loc36_5.2 => constants.%.1ac
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness => constants.%custom_witness.7b9
|
||||
// CHECK:STDOUT: %impl.elem0.loc36_5.2 => constants.%Equal
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc36_5.2 => constants.%Equal
|
||||
// CHECK:STDOUT: %assoc1 => constants.%assoc1.a0a
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type => constants.%EqWith.WithSelf.NotEqual.type.6b7
|
||||
// CHECK:STDOUT: %.loc37_5.2 => constants.%.ad8
|
||||
// CHECK:STDOUT: %impl.elem1.loc37_5.2 => constants.%B3.NotEqual
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc37_5.2 => constants.%B3.NotEqual
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,549 @@
|
||||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon
|
||||
// EXTRA-ARGS: --target=x86_64-linux-gnu --clang-arg=-std=c++20
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/operators/spaceship.carbon
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/operators/spaceship.carbon
|
||||
|
||||
// --- compare.h
|
||||
|
||||
namespace std {
|
||||
class partial_ordering {
|
||||
public:
|
||||
static const partial_ordering less;
|
||||
static const partial_ordering equivalent;
|
||||
static const partial_ordering greater;
|
||||
static const partial_ordering unordered;
|
||||
|
||||
friend constexpr bool operator==(partial_ordering v, int) noexcept;
|
||||
friend constexpr bool operator==(partial_ordering v, partial_ordering w) noexcept = default;
|
||||
friend constexpr bool operator<(partial_ordering v, int) noexcept;
|
||||
friend constexpr bool operator>(partial_ordering v, int) noexcept;
|
||||
friend constexpr bool operator<=(partial_ordering v, int) noexcept;
|
||||
friend constexpr bool operator>=(partial_ordering v, int) noexcept;
|
||||
friend constexpr bool operator<(int, partial_ordering v) noexcept;
|
||||
friend constexpr bool operator>(int, partial_ordering v) noexcept;
|
||||
friend constexpr bool operator<=(int, partial_ordering v) noexcept;
|
||||
friend constexpr bool operator>=(int, partial_ordering v) noexcept;
|
||||
friend constexpr partial_ordering operator<=>(partial_ordering v, int) noexcept;
|
||||
friend constexpr partial_ordering operator<=>(int, partial_ordering v) noexcept;
|
||||
private:
|
||||
int value_;
|
||||
constexpr explicit partial_ordering(int x) noexcept : value_(x) {}
|
||||
};
|
||||
constexpr auto partial_ordering::less = partial_ordering(-1);
|
||||
constexpr auto partial_ordering::equivalent = partial_ordering(0);
|
||||
constexpr auto partial_ordering::greater = partial_ordering(1);
|
||||
constexpr auto partial_ordering::unordered = partial_ordering(2);
|
||||
|
||||
class weak_ordering {
|
||||
public:
|
||||
static const weak_ordering less;
|
||||
static const weak_ordering equivalent;
|
||||
static const weak_ordering greater;
|
||||
|
||||
friend constexpr bool operator==(weak_ordering v, int) noexcept;
|
||||
friend constexpr bool operator==(weak_ordering v, weak_ordering w) noexcept = default;
|
||||
friend constexpr bool operator<(weak_ordering v, int) noexcept;
|
||||
friend constexpr bool operator>(weak_ordering v, int) noexcept;
|
||||
friend constexpr bool operator<=(weak_ordering v, int) noexcept;
|
||||
friend constexpr bool operator>=(weak_ordering v, int) noexcept;
|
||||
friend constexpr bool operator<(int, weak_ordering v) noexcept;
|
||||
friend constexpr bool operator>(int, weak_ordering v) noexcept;
|
||||
friend constexpr bool operator<=(int, weak_ordering v) noexcept;
|
||||
friend constexpr bool operator>=(int, weak_ordering v) noexcept;
|
||||
friend constexpr weak_ordering operator<=>(weak_ordering v, int) noexcept;
|
||||
friend constexpr weak_ordering operator<=>(int, weak_ordering v) noexcept;
|
||||
private:
|
||||
int value_;
|
||||
constexpr explicit weak_ordering(int x) noexcept : value_(x) {}
|
||||
};
|
||||
constexpr auto weak_ordering::less = weak_ordering(-1);
|
||||
constexpr auto weak_ordering::equivalent = weak_ordering(0);
|
||||
constexpr auto weak_ordering::greater = weak_ordering(1);
|
||||
|
||||
class strong_ordering {
|
||||
public:
|
||||
static const strong_ordering less;
|
||||
static const strong_ordering equal;
|
||||
static const strong_ordering equivalent;
|
||||
static const strong_ordering greater;
|
||||
|
||||
friend constexpr bool operator==(strong_ordering v, int) noexcept;
|
||||
friend constexpr bool operator==(strong_ordering v, strong_ordering w) noexcept = default;
|
||||
friend constexpr bool operator<(strong_ordering v, int) noexcept;
|
||||
friend constexpr bool operator>(strong_ordering v, int) noexcept;
|
||||
friend constexpr bool operator<=(strong_ordering v, int) noexcept;
|
||||
friend constexpr bool operator>=(strong_ordering v, int) noexcept;
|
||||
friend constexpr bool operator<(int, strong_ordering v) noexcept;
|
||||
friend constexpr bool operator>(int, strong_ordering v) noexcept;
|
||||
friend constexpr bool operator<=(int, strong_ordering v) noexcept;
|
||||
friend constexpr bool operator>=(int, strong_ordering v) noexcept;
|
||||
friend constexpr strong_ordering operator<=>(strong_ordering v, int) noexcept;
|
||||
friend constexpr strong_ordering operator<=>(int, strong_ordering v) noexcept;
|
||||
private:
|
||||
int value_;
|
||||
constexpr explicit strong_ordering(int x) noexcept : value_(x) {}
|
||||
};
|
||||
constexpr auto strong_ordering::less = strong_ordering(-1);
|
||||
constexpr auto strong_ordering::equal = strong_ordering(0);
|
||||
constexpr auto strong_ordering::equivalent = strong_ordering(0);
|
||||
constexpr auto strong_ordering::greater = strong_ordering(1);
|
||||
} // namespace std
|
||||
|
||||
// --- three_way_comparable_types.h
|
||||
|
||||
#include "compare.h"
|
||||
|
||||
struct DefaultSpaceshipOnly {
|
||||
public:
|
||||
auto operator<=>(const DefaultSpaceshipOnly&) const = default;
|
||||
};
|
||||
|
||||
struct ReturnsStrongOrdering {
|
||||
auto operator<=>(ReturnsStrongOrdering) const -> std::strong_ordering;
|
||||
};
|
||||
|
||||
struct ReturnsWeakOrdering {
|
||||
auto operator<=>(ReturnsWeakOrdering) const -> std::weak_ordering;
|
||||
};
|
||||
|
||||
struct ReturnsPartialOrdering {
|
||||
auto operator<=>(ReturnsPartialOrdering) const -> std::partial_ordering;
|
||||
};
|
||||
|
||||
struct CrossTypeRhs;
|
||||
struct CrossTypeLhs {
|
||||
auto operator<=>(CrossTypeRhs) const -> std::strong_ordering;
|
||||
};
|
||||
struct CrossTypeRhs {
|
||||
auto operator<=>(CrossTypeLhs) const -> std::strong_ordering;
|
||||
};
|
||||
|
||||
// --- fail_todo_spaceship_rewrites.carbon
|
||||
|
||||
import Cpp library "three_way_comparable_types.h";
|
||||
|
||||
fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
//@dump-sem-ir-begin
|
||||
x == y;
|
||||
x != y;
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) {
|
||||
//@dump-sem-ir-begin
|
||||
x < y;
|
||||
x <= y;
|
||||
x > y;
|
||||
x >= y;
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
fn Test(default_spaceship_only: Cpp.DefaultSpaceshipOnly,
|
||||
returns_strong_ordering: Cpp.ReturnsStrongOrdering,
|
||||
returns_weak_ordering: Cpp.ReturnsWeakOrdering,
|
||||
returns_partial_ordering: Cpp.ReturnsPartialOrdering,
|
||||
cross_type_lhs: Cpp.CrossTypeLhs,
|
||||
cross_type_rhs: Cpp.CrossTypeRhs) {
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator!= using operator== is not supported` [SemanticsTodo]
|
||||
// CHECK:STDERR: EqWith(default_spaceship_only, default_spaceship_only);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-25]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(default_spaceship_only, default_spaceship_only);
|
||||
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator< using operator<=> is not supported` [SemanticsTodo]
|
||||
// CHECK:STDERR: OrderedWith(default_spaceship_only, default_spaceship_only);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-27]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
OrderedWith(default_spaceship_only, default_spaceship_only);
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator< using operator<=> is not supported` [SemanticsTodo]
|
||||
// CHECK:STDERR: OrderedWith(returns_strong_ordering, returns_strong_ordering);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-35]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
OrderedWith(returns_strong_ordering, returns_strong_ordering);
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator< using operator<=> is not supported` [SemanticsTodo]
|
||||
// CHECK:STDERR: OrderedWith(returns_partial_ordering, returns_partial_ordering);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-43]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
OrderedWith(returns_partial_ordering, returns_partial_ordering);
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE+7]]:3: error: semantics TODO: `Rewriting operator< using operator<=> is not supported` [SemanticsTodo]
|
||||
// CHECK:STDERR: OrderedWith(cross_type_lhs, cross_type_rhs);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-51]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
OrderedWith(cross_type_lhs, cross_type_rhs);
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE+11]]:3: error: semantics TODO: `Rewriting operator< using operator<=> is not supported` [SemanticsTodo]
|
||||
// CHECK:STDERR: OrderedWith(cross_type_rhs, cross_type_lhs);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-59]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn OrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_todo_spaceship_rewrites.carbon:[[@LINE-52]]:9: warning: binding `returns_weak_ordering` unused [UnusedBinding]
|
||||
// CHECK:STDERR: returns_weak_ordering: Cpp.ReturnsWeakOrdering,
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
OrderedWith(cross_type_rhs, cross_type_lhs);
|
||||
}
|
||||
|
||||
// --- fail_never_valid.carbon
|
||||
// CHECK:STDERR: fail_never_valid.carbon: error: `Main//default` previously provided by `fail_todo_spaceship_rewrites.carbon` [DuplicateMainApi]
|
||||
// CHECK:STDERR:
|
||||
|
||||
import Cpp library "three_way_comparable_types.h";
|
||||
|
||||
fn EqWith[U:! type, T:! Core.EqWith(U)](unused x: T, unused y: U) {}
|
||||
|
||||
fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) {
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.ReturnsStrongOrdering` into type implementing `Core.EqWith(Cpp.ReturnsStrongOrdering)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: EqWith(returns_strong_ordering, returns_strong_ordering);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_never_valid.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn EqWith[U:! type, T:! Core.EqWith(U)](unused x: T, unused y: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
EqWith(returns_strong_ordering, returns_strong_ordering);
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- fail_todo_spaceship_rewrites.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Other: type = symbolic_binding Other, 0 [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.type.411e55.1: type = facet_type <@EqWith.1, @EqWith.1(%Other)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.75d78e.1: %EqWith.type.411e55.1 = symbolic_binding Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.14b5be.1: type = assoc_entity_type @EqWith.1, @EqWith.1(%Other) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.e50259.1: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%Other, %Self.75d78e.1) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.ec9479.1: %EqWith.WithSelf.NotEqual.type.e50259.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.838401.1: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%Other, %Self.75d78e.1) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.dd9722.1: %EqWith.WithSelf.Equal.type.838401.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.type.411e55.2: type = facet_type <@EqWith.1, @EqWith.1(%U)> [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.548: type = pattern_type %EqWith.type.411e55.2 [symbolic]
|
||||
// CHECK:STDOUT: %T.75d: %EqWith.type.411e55.2 = symbolic_binding T, 1 [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type.14b5be.2: type = assoc_entity_type @EqWith.1, @EqWith.1(%U) [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.8eade4.2: %EqWith.assoc_type.14b5be.2 = assoc_entity element0, imports.%Core.import_ref.30a [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.c6914e.2: %EqWith.assoc_type.14b5be.2 = assoc_entity element1, imports.%Core.import_ref.b99 [symbolic]
|
||||
// CHECK:STDOUT: %T.as_type.300: type = facet_access_type %T.75d [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.5dd0fd.2: type = pattern_type %T.as_type.300 [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.51d1c4.2: type = pattern_type %U [symbolic]
|
||||
// CHECK:STDOUT: %require_complete.b51: <witness> = require_complete_type %EqWith.type.411e55.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.9e2: %EqWith.assoc_type.14b5be.1 = assoc_entity element0, imports.%Core.import_ref.27d [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.75d, @EqWith.1, @EqWith.1(%U) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.838401.3: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U, %T.75d) [symbolic]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.e50259.3: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U, %T.75d) [symbolic]
|
||||
// CHECK:STDOUT: %.5a0: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.838401.3, %T.75d [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem0.d9c: %.5a0 = impl_witness_access %EqWith.lookup_impl_witness, element0 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.9eb: <specific function> = specific_impl_function %impl.elem0.d9c, @EqWith.WithSelf.Equal(%U, %T.75d) [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.641: %EqWith.assoc_type.14b5be.1 = assoc_entity element1, imports.%Core.import_ref.6e8 [symbolic]
|
||||
// CHECK:STDOUT: %.fc6: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.e50259.3, %T.75d [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem1.802: %.fc6 = impl_witness_access %EqWith.lookup_impl_witness, element1 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.494: <specific function> = specific_impl_function %impl.elem1.802, @EqWith.WithSelf.NotEqual(%U, %T.75d) [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.type.ca8786.1: type = facet_type <@OrderedWith.1, @OrderedWith.1(%Other)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.adc9f7.1: %OrderedWith.type.ca8786.1 = symbolic_binding Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.assoc_type.2b366e.1: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%Other) [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.9696d2.1: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%Other, %Self.adc9f7.1) [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.975556.1: %OrderedWith.WithSelf.GreaterOrEquivalent.type.9696d2.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.6f28f1.1: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%Other, %Self.adc9f7.1) [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.c82b75.1: %OrderedWith.WithSelf.Greater.type.6f28f1.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.970504.1: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%Other, %Self.adc9f7.1) [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.86efc4.1: %OrderedWith.WithSelf.LessOrEquivalent.type.970504.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.df27e9.1: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%Other, %Self.adc9f7.1) [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Less.1a4163.1: %OrderedWith.WithSelf.Less.type.df27e9.1 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.type.ca8786.2: type = facet_type <@OrderedWith.1, @OrderedWith.1(%U)> [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.d3f: type = pattern_type %OrderedWith.type.ca8786.2 [symbolic]
|
||||
// CHECK:STDOUT: %T.adc: %OrderedWith.type.ca8786.2 = symbolic_binding T, 1 [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.assoc_type.2b366e.2: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%U) [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.f6e965.2: %OrderedWith.assoc_type.2b366e.2 = assoc_entity element0, imports.%Core.import_ref.255 [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.23402c.2: %OrderedWith.assoc_type.2b366e.2 = assoc_entity element1, imports.%Core.import_ref.857 [symbolic]
|
||||
// CHECK:STDOUT: %assoc2.771acd.2: %OrderedWith.assoc_type.2b366e.2 = assoc_entity element2, imports.%Core.import_ref.a0a [symbolic]
|
||||
// CHECK:STDOUT: %assoc3.ba2aca.2: %OrderedWith.assoc_type.2b366e.2 = assoc_entity element3, imports.%Core.import_ref.bb2 [symbolic]
|
||||
// CHECK:STDOUT: %T.as_type.5ac: type = facet_access_type %T.adc [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.c70b34.2: type = pattern_type %T.as_type.5ac [symbolic]
|
||||
// CHECK:STDOUT: %require_complete.3d2: <witness> = require_complete_type %OrderedWith.type.ca8786.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.666: %OrderedWith.assoc_type.2b366e.1 = assoc_entity element0, imports.%Core.import_ref.e2b [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.adc, @OrderedWith.1, @OrderedWith.1(%U) [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.df27e9.3: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%U, %T.adc) [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.970504.3: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%U, %T.adc) [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.6f28f1.3: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%U, %T.adc) [symbolic]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.9696d2.3: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%U, %T.adc) [symbolic]
|
||||
// CHECK:STDOUT: %.0af: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.df27e9.3, %T.adc [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem0.544: %.0af = impl_witness_access %OrderedWith.lookup_impl_witness, element0 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.072: <specific function> = specific_impl_function %impl.elem0.544, @OrderedWith.WithSelf.Less(%U, %T.adc) [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.e40: %OrderedWith.assoc_type.2b366e.1 = assoc_entity element1, imports.%Core.import_ref.ce4 [symbolic]
|
||||
// CHECK:STDOUT: %.81b: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.970504.3, %T.adc [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem1.503: %.81b = impl_witness_access %OrderedWith.lookup_impl_witness, element1 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.2f8: <specific function> = specific_impl_function %impl.elem1.503, @OrderedWith.WithSelf.LessOrEquivalent(%U, %T.adc) [symbolic]
|
||||
// CHECK:STDOUT: %assoc2.b0e: %OrderedWith.assoc_type.2b366e.1 = assoc_entity element2, imports.%Core.import_ref.40e [symbolic]
|
||||
// CHECK:STDOUT: %.f69: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.6f28f1.3, %T.adc [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem2: %.f69 = impl_witness_access %OrderedWith.lookup_impl_witness, element2 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.1cd: <specific function> = specific_impl_function %impl.elem2, @OrderedWith.WithSelf.Greater(%U, %T.adc) [symbolic]
|
||||
// CHECK:STDOUT: %assoc3.078: %OrderedWith.assoc_type.2b366e.1 = assoc_entity element3, imports.%Core.import_ref.a50 [symbolic]
|
||||
// CHECK:STDOUT: %.206: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.9696d2.3, %T.adc [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem3: %.206 = impl_witness_access %OrderedWith.lookup_impl_witness, element3 [symbolic]
|
||||
// CHECK:STDOUT: %specific_impl_fn.b2f: <specific function> = specific_impl_function %impl.elem3, @OrderedWith.WithSelf.GreaterOrEquivalent(%U, %T.adc) [symbolic]
|
||||
// CHECK:STDOUT: %DefaultSpaceshipOnly: type = class_type @DefaultSpaceshipOnly [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.b0d: type = pattern_type %DefaultSpaceshipOnly [concrete]
|
||||
// CHECK:STDOUT: %ReturnsStrongOrdering: type = class_type @ReturnsStrongOrdering [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.eea: type = pattern_type %ReturnsStrongOrdering [concrete]
|
||||
// CHECK:STDOUT: %ReturnsPartialOrdering: type = class_type @ReturnsPartialOrdering [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.b82: type = pattern_type %ReturnsPartialOrdering [concrete]
|
||||
// CHECK:STDOUT: %CrossTypeLhs: type = class_type @CrossTypeLhs [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.8a9: type = pattern_type %CrossTypeLhs [concrete]
|
||||
// CHECK:STDOUT: %CrossTypeRhs: type = class_type @CrossTypeRhs [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.217: type = pattern_type %CrossTypeRhs [concrete]
|
||||
// CHECK:STDOUT: %EqWith.type.d83: type = facet_type <@EqWith.1, @EqWith.1(%DefaultSpaceshipOnly)> [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.91e: type = pattern_type %EqWith.type.d83 [concrete]
|
||||
// CHECK:STDOUT: %OrderedWith.type.9d3: type = facet_type <@OrderedWith.1, @OrderedWith.1(%DefaultSpaceshipOnly)> [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.072: type = pattern_type %OrderedWith.type.9d3 [concrete]
|
||||
// CHECK:STDOUT: %OrderedWith.type.075: type = facet_type <@OrderedWith.1, @OrderedWith.1(%ReturnsStrongOrdering)> [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.f88: type = pattern_type %OrderedWith.type.075 [concrete]
|
||||
// CHECK:STDOUT: %OrderedWith.type.413: type = facet_type <@OrderedWith.1, @OrderedWith.1(%ReturnsPartialOrdering)> [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.0bb: type = pattern_type %OrderedWith.type.413 [concrete]
|
||||
// CHECK:STDOUT: %OrderedWith.type.6fd: type = facet_type <@OrderedWith.1, @OrderedWith.1(%CrossTypeRhs)> [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.757: type = pattern_type %OrderedWith.type.6fd [concrete]
|
||||
// CHECK:STDOUT: %OrderedWith.type.685: type = facet_type <@OrderedWith.1, @OrderedWith.1(%CrossTypeLhs)> [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.736: type = pattern_type %OrderedWith.type.685 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core.import_ref.3e8: @EqWith.WithSelf.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%assoc0 (constants.%assoc0.9e2)]
|
||||
// CHECK:STDOUT: %Core.import_ref.c1e: @EqWith.WithSelf.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%assoc1 (constants.%assoc1.641)]
|
||||
// CHECK:STDOUT: %Core.import_ref.b99: @EqWith.WithSelf.%EqWith.WithSelf.NotEqual.type (%EqWith.WithSelf.NotEqual.type.e50259.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%EqWith.WithSelf.NotEqual (constants.%EqWith.WithSelf.NotEqual.ec9479.1)]
|
||||
// CHECK:STDOUT: %Core.import_ref.30a: @EqWith.WithSelf.%EqWith.WithSelf.Equal.type (%EqWith.WithSelf.Equal.type.838401.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @EqWith.WithSelf.%EqWith.WithSelf.Equal (constants.%EqWith.WithSelf.Equal.dd9722.1)]
|
||||
// CHECK:STDOUT: %Core.import_ref.27d = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.6e8 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.7e9: @OrderedWith.WithSelf.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.WithSelf.%assoc0 (constants.%assoc0.666)]
|
||||
// CHECK:STDOUT: %Core.import_ref.c86: @OrderedWith.WithSelf.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.WithSelf.%assoc1 (constants.%assoc1.e40)]
|
||||
// CHECK:STDOUT: %Core.import_ref.f4f: @OrderedWith.WithSelf.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.WithSelf.%assoc2 (constants.%assoc2.b0e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.065: @OrderedWith.WithSelf.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.WithSelf.%assoc3 (constants.%assoc3.078)]
|
||||
// CHECK:STDOUT: %Core.import_ref.bb2: @OrderedWith.WithSelf.%OrderedWith.WithSelf.GreaterOrEquivalent.type (%OrderedWith.WithSelf.GreaterOrEquivalent.type.9696d2.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.WithSelf.%OrderedWith.WithSelf.GreaterOrEquivalent (constants.%OrderedWith.WithSelf.GreaterOrEquivalent.975556.1)]
|
||||
// CHECK:STDOUT: %Core.import_ref.a0a: @OrderedWith.WithSelf.%OrderedWith.WithSelf.Greater.type (%OrderedWith.WithSelf.Greater.type.6f28f1.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.WithSelf.%OrderedWith.WithSelf.Greater (constants.%OrderedWith.WithSelf.Greater.c82b75.1)]
|
||||
// CHECK:STDOUT: %Core.import_ref.857: @OrderedWith.WithSelf.%OrderedWith.WithSelf.LessOrEquivalent.type (%OrderedWith.WithSelf.LessOrEquivalent.type.970504.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.WithSelf.%OrderedWith.WithSelf.LessOrEquivalent (constants.%OrderedWith.WithSelf.LessOrEquivalent.86efc4.1)]
|
||||
// CHECK:STDOUT: %Core.import_ref.255: @OrderedWith.WithSelf.%OrderedWith.WithSelf.Less.type (%OrderedWith.WithSelf.Less.type.df27e9.1) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.WithSelf.%OrderedWith.WithSelf.Less (constants.%OrderedWith.WithSelf.Less.1a4163.1)]
|
||||
// CHECK:STDOUT: %Core.import_ref.e2b = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.ce4 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.40e = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.a50 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @EqWith.loc4(%U.loc4_12.2: type, %T.loc4_22.2: @EqWith.loc4.%EqWith.type.loc4_38.1 (%EqWith.type.411e55.2)) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %require_complete.loc6: <witness> = require_complete_type %EqWith.type.loc4_38.1 [symbolic = %require_complete.loc6 (constants.%require_complete.b51)]
|
||||
// CHECK:STDOUT: %EqWith.assoc_type: type = assoc_entity_type @EqWith.1, @EqWith.1(%U.loc4_12.1) [symbolic = %EqWith.assoc_type (constants.%EqWith.assoc_type.14b5be.2)]
|
||||
// CHECK:STDOUT: %assoc0: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = assoc_entity element0, imports.%Core.import_ref.30a [symbolic = %assoc0 (constants.%assoc0.8eade4.2)]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.type: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%U.loc4_12.1, %T.loc4_22.1) [symbolic = %EqWith.WithSelf.Equal.type (constants.%EqWith.WithSelf.Equal.type.838401.3)]
|
||||
// CHECK:STDOUT: %.loc6_5.2: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type, %T.loc4_22.1 [symbolic = %.loc6_5.2 (constants.%.5a0)]
|
||||
// CHECK:STDOUT: %EqWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc4_22.1, @EqWith.1, @EqWith.1(%U.loc4_12.1) [symbolic = %EqWith.lookup_impl_witness (constants.%EqWith.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc6_5.2: @EqWith.loc4.%.loc6_5.2 (%.5a0) = impl_witness_access %EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_5.2 (constants.%impl.elem0.d9c)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc6_5.2: <specific function> = specific_impl_function %impl.elem0.loc6_5.2, @EqWith.WithSelf.Equal(%U.loc4_12.1, %T.loc4_22.1) [symbolic = %specific_impl_fn.loc6_5.2 (constants.%specific_impl_fn.9eb)]
|
||||
// CHECK:STDOUT: %assoc1: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = assoc_entity element1, imports.%Core.import_ref.b99 [symbolic = %assoc1 (constants.%assoc1.c6914e.2)]
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%U.loc4_12.1, %T.loc4_22.1) [symbolic = %EqWith.WithSelf.NotEqual.type (constants.%EqWith.WithSelf.NotEqual.type.e50259.3)]
|
||||
// CHECK:STDOUT: %.loc7_5.2: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type, %T.loc4_22.1 [symbolic = %.loc7_5.2 (constants.%.fc6)]
|
||||
// CHECK:STDOUT: %impl.elem1.loc7_5.2: @EqWith.loc4.%.loc7_5.2 (%.fc6) = impl_witness_access %EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc7_5.2 (constants.%impl.elem1.802)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc7_5.2: <specific function> = specific_impl_function %impl.elem1.loc7_5.2, @EqWith.WithSelf.NotEqual(%U.loc4_12.1, %T.loc4_22.1) [symbolic = %specific_impl_fn.loc7_5.2 (constants.%specific_impl_fn.494)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%x.param: @EqWith.loc4.%T.as_type.loc4_44.1 (%T.as_type.300), %y.param: @EqWith.loc4.%U.loc4_12.1 (%U)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref.loc6: @EqWith.loc4.%T.as_type.loc4_44.1 (%T.as_type.300) = name_ref x, %x
|
||||
// CHECK:STDOUT: %y.ref.loc6: @EqWith.loc4.%U.loc4_12.1 (%U) = name_ref y, %y
|
||||
// CHECK:STDOUT: %EqWith.type.loc6: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc4_38.1 (constants.%EqWith.type.411e55.2)]
|
||||
// CHECK:STDOUT: %.loc6_5.1: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = specific_constant imports.%Core.import_ref.3e8, @EqWith.WithSelf(constants.%U, constants.%Self.75d78e.1) [symbolic = %assoc0 (constants.%assoc0.8eade4.2)]
|
||||
// CHECK:STDOUT: %Equal.ref: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = name_ref Equal, %.loc6_5.1 [symbolic = %assoc0 (constants.%assoc0.8eade4.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc6_5.1: @EqWith.loc4.%.loc6_5.2 (%.5a0) = impl_witness_access constants.%EqWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_5.2 (constants.%impl.elem0.d9c)]
|
||||
// CHECK:STDOUT: %bound_method.loc6_5.1: <bound method> = bound_method %x.ref.loc6, %impl.elem0.loc6_5.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc6_5.1: <specific function> = specific_impl_function %impl.elem0.loc6_5.1, @EqWith.WithSelf.Equal(constants.%U, constants.%T.75d) [symbolic = %specific_impl_fn.loc6_5.2 (constants.%specific_impl_fn.9eb)]
|
||||
// CHECK:STDOUT: %bound_method.loc6_5.2: <bound method> = bound_method %x.ref.loc6, %specific_impl_fn.loc6_5.1
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.call: init bool = call %bound_method.loc6_5.2(%x.ref.loc6, %y.ref.loc6)
|
||||
// CHECK:STDOUT: %x.ref.loc7: @EqWith.loc4.%T.as_type.loc4_44.1 (%T.as_type.300) = name_ref x, %x
|
||||
// CHECK:STDOUT: %y.ref.loc7: @EqWith.loc4.%U.loc4_12.1 (%U) = name_ref y, %y
|
||||
// CHECK:STDOUT: %EqWith.type.loc7: type = facet_type <@EqWith.1, @EqWith.1(constants.%U)> [symbolic = %EqWith.type.loc4_38.1 (constants.%EqWith.type.411e55.2)]
|
||||
// CHECK:STDOUT: %.loc7_5.1: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = specific_constant imports.%Core.import_ref.c1e, @EqWith.WithSelf(constants.%U, constants.%Self.75d78e.1) [symbolic = %assoc1 (constants.%assoc1.c6914e.2)]
|
||||
// CHECK:STDOUT: %NotEqual.ref: @EqWith.loc4.%EqWith.assoc_type (%EqWith.assoc_type.14b5be.2) = name_ref NotEqual, %.loc7_5.1 [symbolic = %assoc1 (constants.%assoc1.c6914e.2)]
|
||||
// CHECK:STDOUT: %impl.elem1.loc7_5.1: @EqWith.loc4.%.loc7_5.2 (%.fc6) = impl_witness_access constants.%EqWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc7_5.2 (constants.%impl.elem1.802)]
|
||||
// CHECK:STDOUT: %bound_method.loc7_5.1: <bound method> = bound_method %x.ref.loc7, %impl.elem1.loc7_5.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc7_5.1: <specific function> = specific_impl_function %impl.elem1.loc7_5.1, @EqWith.WithSelf.NotEqual(constants.%U, constants.%T.75d) [symbolic = %specific_impl_fn.loc7_5.2 (constants.%specific_impl_fn.494)]
|
||||
// CHECK:STDOUT: %bound_method.loc7_5.2: <bound method> = bound_method %x.ref.loc7, %specific_impl_fn.loc7_5.1
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.call: init bool = call %bound_method.loc7_5.2(%x.ref.loc7, %y.ref.loc7)
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @OrderedWith.loc11(%U.loc11_17.2: type, %T.loc11_27.2: @OrderedWith.loc11.%OrderedWith.type.loc11_48.1 (%OrderedWith.type.ca8786.2)) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %require_complete.loc13: <witness> = require_complete_type %OrderedWith.type.loc11_48.1 [symbolic = %require_complete.loc13 (constants.%require_complete.3d2)]
|
||||
// CHECK:STDOUT: %OrderedWith.assoc_type: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%U.loc11_17.1) [symbolic = %OrderedWith.assoc_type (constants.%OrderedWith.assoc_type.2b366e.2)]
|
||||
// CHECK:STDOUT: %assoc0: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = assoc_entity element0, imports.%Core.import_ref.255 [symbolic = %assoc0 (constants.%assoc0.f6e965.2)]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %OrderedWith.WithSelf.Less.type (constants.%OrderedWith.WithSelf.Less.type.df27e9.3)]
|
||||
// CHECK:STDOUT: %.loc13_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type, %T.loc11_27.1 [symbolic = %.loc13_5.2 (constants.%.0af)]
|
||||
// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc11_27.1, @OrderedWith.1, @OrderedWith.1(%U.loc11_17.1) [symbolic = %OrderedWith.lookup_impl_witness (constants.%OrderedWith.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_5.2: @OrderedWith.loc11.%.loc13_5.2 (%.0af) = impl_witness_access %OrderedWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_5.2 (constants.%impl.elem0.544)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc13_5.2: <specific function> = specific_impl_function %impl.elem0.loc13_5.2, @OrderedWith.WithSelf.Less(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %specific_impl_fn.loc13_5.2 (constants.%specific_impl_fn.072)]
|
||||
// CHECK:STDOUT: %assoc1: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = assoc_entity element1, imports.%Core.import_ref.857 [symbolic = %assoc1 (constants.%assoc1.23402c.2)]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %OrderedWith.WithSelf.LessOrEquivalent.type (constants.%OrderedWith.WithSelf.LessOrEquivalent.type.970504.3)]
|
||||
// CHECK:STDOUT: %.loc14_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type, %T.loc11_27.1 [symbolic = %.loc14_5.2 (constants.%.81b)]
|
||||
// CHECK:STDOUT: %impl.elem1.loc14_5.2: @OrderedWith.loc11.%.loc14_5.2 (%.81b) = impl_witness_access %OrderedWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_5.2 (constants.%impl.elem1.503)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc14_5.2: <specific function> = specific_impl_function %impl.elem1.loc14_5.2, @OrderedWith.WithSelf.LessOrEquivalent(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %specific_impl_fn.loc14_5.2 (constants.%specific_impl_fn.2f8)]
|
||||
// CHECK:STDOUT: %assoc2: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = assoc_entity element2, imports.%Core.import_ref.a0a [symbolic = %assoc2 (constants.%assoc2.771acd.2)]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %OrderedWith.WithSelf.Greater.type (constants.%OrderedWith.WithSelf.Greater.type.6f28f1.3)]
|
||||
// CHECK:STDOUT: %.loc15_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type, %T.loc11_27.1 [symbolic = %.loc15_5.2 (constants.%.f69)]
|
||||
// CHECK:STDOUT: %impl.elem2.loc15_5.2: @OrderedWith.loc11.%.loc15_5.2 (%.f69) = impl_witness_access %OrderedWith.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc15_5.2 (constants.%impl.elem2)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc15_5.2: <specific function> = specific_impl_function %impl.elem2.loc15_5.2, @OrderedWith.WithSelf.Greater(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %specific_impl_fn.loc15_5.2 (constants.%specific_impl_fn.1cd)]
|
||||
// CHECK:STDOUT: %assoc3: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = assoc_entity element3, imports.%Core.import_ref.bb2 [symbolic = %assoc3 (constants.%assoc3.ba2aca.2)]
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %OrderedWith.WithSelf.GreaterOrEquivalent.type (constants.%OrderedWith.WithSelf.GreaterOrEquivalent.type.9696d2.3)]
|
||||
// CHECK:STDOUT: %.loc16_5.2: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type, %T.loc11_27.1 [symbolic = %.loc16_5.2 (constants.%.206)]
|
||||
// CHECK:STDOUT: %impl.elem3.loc16_5.2: @OrderedWith.loc11.%.loc16_5.2 (%.206) = impl_witness_access %OrderedWith.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc16_5.2 (constants.%impl.elem3)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc16_5.2: <specific function> = specific_impl_function %impl.elem3.loc16_5.2, @OrderedWith.WithSelf.GreaterOrEquivalent(%U.loc11_17.1, %T.loc11_27.1) [symbolic = %specific_impl_fn.loc16_5.2 (constants.%specific_impl_fn.b2f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%x.param: @OrderedWith.loc11.%T.as_type.loc11_54.1 (%T.as_type.5ac), %y.param: @OrderedWith.loc11.%U.loc11_17.1 (%U)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref.loc13: @OrderedWith.loc11.%T.as_type.loc11_54.1 (%T.as_type.5ac) = name_ref x, %x
|
||||
// CHECK:STDOUT: %y.ref.loc13: @OrderedWith.loc11.%U.loc11_17.1 (%U) = name_ref y, %y
|
||||
// CHECK:STDOUT: %OrderedWith.type.loc13: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_48.1 (constants.%OrderedWith.type.ca8786.2)]
|
||||
// CHECK:STDOUT: %.loc13_5.1: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = specific_constant imports.%Core.import_ref.7e9, @OrderedWith.WithSelf(constants.%U, constants.%Self.adc9f7.1) [symbolic = %assoc0 (constants.%assoc0.f6e965.2)]
|
||||
// CHECK:STDOUT: %Less.ref: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = name_ref Less, %.loc13_5.1 [symbolic = %assoc0 (constants.%assoc0.f6e965.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_5.1: @OrderedWith.loc11.%.loc13_5.2 (%.0af) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_5.2 (constants.%impl.elem0.544)]
|
||||
// CHECK:STDOUT: %bound_method.loc13_5.1: <bound method> = bound_method %x.ref.loc13, %impl.elem0.loc13_5.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc13_5.1: <specific function> = specific_impl_function %impl.elem0.loc13_5.1, @OrderedWith.WithSelf.Less(constants.%U, constants.%T.adc) [symbolic = %specific_impl_fn.loc13_5.2 (constants.%specific_impl_fn.072)]
|
||||
// CHECK:STDOUT: %bound_method.loc13_5.2: <bound method> = bound_method %x.ref.loc13, %specific_impl_fn.loc13_5.1
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Less.call: init bool = call %bound_method.loc13_5.2(%x.ref.loc13, %y.ref.loc13)
|
||||
// CHECK:STDOUT: %x.ref.loc14: @OrderedWith.loc11.%T.as_type.loc11_54.1 (%T.as_type.5ac) = name_ref x, %x
|
||||
// CHECK:STDOUT: %y.ref.loc14: @OrderedWith.loc11.%U.loc11_17.1 (%U) = name_ref y, %y
|
||||
// CHECK:STDOUT: %OrderedWith.type.loc14: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_48.1 (constants.%OrderedWith.type.ca8786.2)]
|
||||
// CHECK:STDOUT: %.loc14_5.1: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = specific_constant imports.%Core.import_ref.c86, @OrderedWith.WithSelf(constants.%U, constants.%Self.adc9f7.1) [symbolic = %assoc1 (constants.%assoc1.23402c.2)]
|
||||
// CHECK:STDOUT: %LessOrEquivalent.ref: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = name_ref LessOrEquivalent, %.loc14_5.1 [symbolic = %assoc1 (constants.%assoc1.23402c.2)]
|
||||
// CHECK:STDOUT: %impl.elem1.loc14_5.1: @OrderedWith.loc11.%.loc14_5.2 (%.81b) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_5.2 (constants.%impl.elem1.503)]
|
||||
// CHECK:STDOUT: %bound_method.loc14_5.1: <bound method> = bound_method %x.ref.loc14, %impl.elem1.loc14_5.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc14_5.1: <specific function> = specific_impl_function %impl.elem1.loc14_5.1, @OrderedWith.WithSelf.LessOrEquivalent(constants.%U, constants.%T.adc) [symbolic = %specific_impl_fn.loc14_5.2 (constants.%specific_impl_fn.2f8)]
|
||||
// CHECK:STDOUT: %bound_method.loc14_5.2: <bound method> = bound_method %x.ref.loc14, %specific_impl_fn.loc14_5.1
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.call: init bool = call %bound_method.loc14_5.2(%x.ref.loc14, %y.ref.loc14)
|
||||
// CHECK:STDOUT: %x.ref.loc15: @OrderedWith.loc11.%T.as_type.loc11_54.1 (%T.as_type.5ac) = name_ref x, %x
|
||||
// CHECK:STDOUT: %y.ref.loc15: @OrderedWith.loc11.%U.loc11_17.1 (%U) = name_ref y, %y
|
||||
// CHECK:STDOUT: %OrderedWith.type.loc15: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_48.1 (constants.%OrderedWith.type.ca8786.2)]
|
||||
// CHECK:STDOUT: %.loc15_5.1: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = specific_constant imports.%Core.import_ref.f4f, @OrderedWith.WithSelf(constants.%U, constants.%Self.adc9f7.1) [symbolic = %assoc2 (constants.%assoc2.771acd.2)]
|
||||
// CHECK:STDOUT: %Greater.ref: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = name_ref Greater, %.loc15_5.1 [symbolic = %assoc2 (constants.%assoc2.771acd.2)]
|
||||
// CHECK:STDOUT: %impl.elem2.loc15_5.1: @OrderedWith.loc11.%.loc15_5.2 (%.f69) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc15_5.2 (constants.%impl.elem2)]
|
||||
// CHECK:STDOUT: %bound_method.loc15_5.1: <bound method> = bound_method %x.ref.loc15, %impl.elem2.loc15_5.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc15_5.1: <specific function> = specific_impl_function %impl.elem2.loc15_5.1, @OrderedWith.WithSelf.Greater(constants.%U, constants.%T.adc) [symbolic = %specific_impl_fn.loc15_5.2 (constants.%specific_impl_fn.1cd)]
|
||||
// CHECK:STDOUT: %bound_method.loc15_5.2: <bound method> = bound_method %x.ref.loc15, %specific_impl_fn.loc15_5.1
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.call: init bool = call %bound_method.loc15_5.2(%x.ref.loc15, %y.ref.loc15)
|
||||
// CHECK:STDOUT: %x.ref.loc16: @OrderedWith.loc11.%T.as_type.loc11_54.1 (%T.as_type.5ac) = name_ref x, %x
|
||||
// CHECK:STDOUT: %y.ref.loc16: @OrderedWith.loc11.%U.loc11_17.1 (%U) = name_ref y, %y
|
||||
// CHECK:STDOUT: %OrderedWith.type.loc16: type = facet_type <@OrderedWith.1, @OrderedWith.1(constants.%U)> [symbolic = %OrderedWith.type.loc11_48.1 (constants.%OrderedWith.type.ca8786.2)]
|
||||
// CHECK:STDOUT: %.loc16_5.1: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = specific_constant imports.%Core.import_ref.065, @OrderedWith.WithSelf(constants.%U, constants.%Self.adc9f7.1) [symbolic = %assoc3 (constants.%assoc3.ba2aca.2)]
|
||||
// CHECK:STDOUT: %GreaterOrEquivalent.ref: @OrderedWith.loc11.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b366e.2) = name_ref GreaterOrEquivalent, %.loc16_5.1 [symbolic = %assoc3 (constants.%assoc3.ba2aca.2)]
|
||||
// CHECK:STDOUT: %impl.elem3.loc16_5.1: @OrderedWith.loc11.%.loc16_5.2 (%.206) = impl_witness_access constants.%OrderedWith.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc16_5.2 (constants.%impl.elem3)]
|
||||
// CHECK:STDOUT: %bound_method.loc16_5.1: <bound method> = bound_method %x.ref.loc16, %impl.elem3.loc16_5.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc16_5.1: <specific function> = specific_impl_function %impl.elem3.loc16_5.1, @OrderedWith.WithSelf.GreaterOrEquivalent(constants.%U, constants.%T.adc) [symbolic = %specific_impl_fn.loc16_5.2 (constants.%specific_impl_fn.b2f)]
|
||||
// CHECK:STDOUT: %bound_method.loc16_5.2: <bound method> = bound_method %x.ref.loc16, %specific_impl_fn.loc16_5.1
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.call: init bool = call %bound_method.loc16_5.2(%x.ref.loc16, %y.ref.loc16)
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @EqWith.loc4(constants.%U, constants.%T.75d) {
|
||||
// CHECK:STDOUT: %U.loc4_12.1 => constants.%U
|
||||
// CHECK:STDOUT: %EqWith.type.loc4_38.1 => constants.%EqWith.type.411e55.2
|
||||
// CHECK:STDOUT: %T.loc4_22.1 => constants.%T.75d
|
||||
// CHECK:STDOUT: %pattern_type.loc4_22 => constants.%pattern_type.548
|
||||
// CHECK:STDOUT: %T.as_type.loc4_44.1 => constants.%T.as_type.300
|
||||
// CHECK:STDOUT: %pattern_type.loc4_42 => constants.%pattern_type.5dd0fd.2
|
||||
// CHECK:STDOUT: %pattern_type.loc4_48 => constants.%pattern_type.51d1c4.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @OrderedWith.loc11(constants.%U, constants.%T.adc) {
|
||||
// CHECK:STDOUT: %U.loc11_17.1 => constants.%U
|
||||
// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.ca8786.2
|
||||
// CHECK:STDOUT: %T.loc11_27.1 => constants.%T.adc
|
||||
// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.d3f
|
||||
// CHECK:STDOUT: %T.as_type.loc11_54.1 => constants.%T.as_type.5ac
|
||||
// CHECK:STDOUT: %pattern_type.loc11_52 => constants.%pattern_type.c70b34.2
|
||||
// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.51d1c4.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @EqWith.loc4(constants.%DefaultSpaceshipOnly, <error>) {
|
||||
// CHECK:STDOUT: %U.loc4_12.1 => constants.%DefaultSpaceshipOnly
|
||||
// CHECK:STDOUT: %EqWith.type.loc4_38.1 => constants.%EqWith.type.d83
|
||||
// CHECK:STDOUT: %T.loc4_22.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc4_22 => constants.%pattern_type.91e
|
||||
// CHECK:STDOUT: %T.as_type.loc4_44.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc4_42 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc4_48 => constants.%pattern_type.b0d
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @OrderedWith.loc11(constants.%DefaultSpaceshipOnly, <error>) {
|
||||
// CHECK:STDOUT: %U.loc11_17.1 => constants.%DefaultSpaceshipOnly
|
||||
// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.9d3
|
||||
// CHECK:STDOUT: %T.loc11_27.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.072
|
||||
// CHECK:STDOUT: %T.as_type.loc11_54.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_52 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.b0d
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @OrderedWith.loc11(constants.%ReturnsStrongOrdering, <error>) {
|
||||
// CHECK:STDOUT: %U.loc11_17.1 => constants.%ReturnsStrongOrdering
|
||||
// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.075
|
||||
// CHECK:STDOUT: %T.loc11_27.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.f88
|
||||
// CHECK:STDOUT: %T.as_type.loc11_54.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_52 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.eea
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @OrderedWith.loc11(constants.%ReturnsPartialOrdering, <error>) {
|
||||
// CHECK:STDOUT: %U.loc11_17.1 => constants.%ReturnsPartialOrdering
|
||||
// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.413
|
||||
// CHECK:STDOUT: %T.loc11_27.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.0bb
|
||||
// CHECK:STDOUT: %T.as_type.loc11_54.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_52 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.b82
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @OrderedWith.loc11(constants.%CrossTypeRhs, <error>) {
|
||||
// CHECK:STDOUT: %U.loc11_17.1 => constants.%CrossTypeRhs
|
||||
// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.6fd
|
||||
// CHECK:STDOUT: %T.loc11_27.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.757
|
||||
// CHECK:STDOUT: %T.as_type.loc11_54.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_52 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.217
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @OrderedWith.loc11(constants.%CrossTypeLhs, <error>) {
|
||||
// CHECK:STDOUT: %U.loc11_17.1 => constants.%CrossTypeLhs
|
||||
// CHECK:STDOUT: %OrderedWith.type.loc11_48.1 => constants.%OrderedWith.type.685
|
||||
// CHECK:STDOUT: %T.loc11_27.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_27 => constants.%pattern_type.736
|
||||
// CHECK:STDOUT: %T.as_type.loc11_54.1 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_52 => <error>
|
||||
// CHECK:STDOUT: %pattern_type.loc11_58 => constants.%pattern_type.8a9
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -0,0 +1,623 @@
|
||||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lower/testdata/interop/cpp/operators.carbon
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/interop/cpp/operators.carbon
|
||||
|
||||
// --- eq_with.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Cpp inline '''c++
|
||||
struct A {
|
||||
int value;
|
||||
|
||||
friend auto operator==(A x, A y) -> bool {
|
||||
return x.value == y.value;
|
||||
}
|
||||
|
||||
friend auto operator!=(A x, A y) -> bool {
|
||||
return !(x == y);
|
||||
}
|
||||
};
|
||||
''';
|
||||
|
||||
fn CheckEqWith[U:! type, T:! Core.EqWith(U)](x: T, y: U) {
|
||||
x == y;
|
||||
x != y;
|
||||
}
|
||||
|
||||
fn Driver(x: Cpp.A, y: Cpp.A) {
|
||||
CheckEqWith(x, y);
|
||||
}
|
||||
|
||||
// --- ordered_with.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Cpp inline '''c++
|
||||
struct A {
|
||||
int value;
|
||||
|
||||
friend auto operator<(A x, A y) -> bool {
|
||||
return x.value < y.value;
|
||||
}
|
||||
|
||||
friend auto operator>(A x, A y) -> bool {
|
||||
return y < x;
|
||||
}
|
||||
|
||||
friend auto operator<=(A x, A y) -> bool {
|
||||
return !(y < x);
|
||||
}
|
||||
|
||||
friend auto operator>=(A x, A y) -> bool {
|
||||
return !(x < y);
|
||||
}
|
||||
};
|
||||
''';
|
||||
|
||||
fn CheckOrderedWith[U:! type, T:! Core.OrderedWith(U)](x: T, y: U) {
|
||||
x < y;
|
||||
x > y;
|
||||
x <= y;
|
||||
x >= y;
|
||||
}
|
||||
|
||||
fn Driver(x: Cpp.A, y: Cpp.A) {
|
||||
CheckOrderedWith(x, y);
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: ; ModuleID = 'eq_with.carbon'
|
||||
// CHECK:STDOUT: source_filename = "eq_with.carbon"
|
||||
// CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
|
||||
// CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: %struct.A = type { i32 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: $_Zeq1AS_ = comdat any
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: $_Zne1AS_ = comdat any
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CDriver.Main(ptr %x, ptr %y) #0 !dbg !11 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @_CCheckEqWith.Main.795833dfa91e6085(ptr %x, ptr %y), !dbg !18
|
||||
// CHECK:STDOUT: ret void, !dbg !19
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
// CHECK:STDOUT: define internal void @_Zeq1AS_.carbon_thunk(ptr noundef %x, ptr noundef %y, ptr noundef %return) #1 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %y.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp1 = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: store ptr %x, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %y, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %2 = load ptr, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp1, ptr align 4 %2, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %agg.tmp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %3 = load i32, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive2 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp1, i32 0, i32 0
|
||||
// CHECK:STDOUT: %4 = load i32, ptr %coerce.dive2, align 4
|
||||
// CHECK:STDOUT: %call = call noundef zeroext i1 @_Zeq1AS_(i32 %3, i32 %4)
|
||||
// CHECK:STDOUT: %storedv = zext i1 %call to i8
|
||||
// CHECK:STDOUT: store i8 %storedv, ptr %0, align 1, !tbaa !26
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
// CHECK:STDOUT: define internal void @_Zne1AS_.carbon_thunk(ptr noundef %x, ptr noundef %y, ptr noundef %return) #1 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %y.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp1 = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: store ptr %x, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %y, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %2 = load ptr, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp1, ptr align 4 %2, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %agg.tmp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %3 = load i32, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive2 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp1, i32 0, i32 0
|
||||
// CHECK:STDOUT: %4 = load i32, ptr %coerce.dive2, align 4
|
||||
// CHECK:STDOUT: %call = call noundef zeroext i1 @_Zne1AS_(i32 %3, i32 %4)
|
||||
// CHECK:STDOUT: %storedv = zext i1 %call to i8
|
||||
// CHECK:STDOUT: store i8 %storedv, ptr %0, align 1, !tbaa !26
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
|
||||
// CHECK:STDOUT: define i1 @"_CEqual:thunk:EqWith.95dfad7558f19bf5.Core:Cpp"(ptr %self, ptr %other) #2 !dbg !28 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.3.temp = alloca i1, align 1, !dbg !34
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.3.temp), !dbg !34
|
||||
// CHECK:STDOUT: call void @_Zeq1AS_.carbon_thunk(ptr %self, ptr %other, ptr %.3.temp), !dbg !34
|
||||
// CHECK:STDOUT: %0 = load i1, ptr %.3.temp, align 1, !dbg !34
|
||||
// CHECK:STDOUT: ret i1 %0, !dbg !34
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
|
||||
// CHECK:STDOUT: define i1 @"_CNotEqual:thunk:EqWith.95dfad7558f19bf5.Core:Cpp"(ptr %self, ptr %other) #2 !dbg !35 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.3.temp = alloca i1, align 1, !dbg !39
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.3.temp), !dbg !39
|
||||
// CHECK:STDOUT: call void @_Zne1AS_.carbon_thunk(ptr %self, ptr %other, ptr %.3.temp), !dbg !39
|
||||
// CHECK:STDOUT: %0 = load i1, ptr %.3.temp, align 1, !dbg !39
|
||||
// CHECK:STDOUT: ret i1 %0, !dbg !39
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CCheckEqWith.Main.795833dfa91e6085(ptr %x, ptr %y) #0 !dbg !40 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.Equal.call = call i1 @"_CEqual:thunk:EqWith.95dfad7558f19bf5.Core:Cpp"(ptr %x, ptr %y), !dbg !44
|
||||
// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.call = call i1 @"_CNotEqual:thunk:EqWith.95dfad7558f19bf5.Core:Cpp"(ptr %x, ptr %y), !dbg !45
|
||||
// CHECK:STDOUT: ret void, !dbg !46
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #3
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
||||
// CHECK:STDOUT: define linkonce_odr dso_local noundef zeroext i1 @_Zeq1AS_(i32 %x.coerce, i32 %y.coerce) #4 comdat {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %y = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %x, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %x.coerce, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive1 = getelementptr inbounds nuw %struct.A, ptr %y, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %y.coerce, ptr %coerce.dive1, align 4
|
||||
// CHECK:STDOUT: %value = getelementptr inbounds nuw %struct.A, ptr %x, i32 0, i32 0
|
||||
// CHECK:STDOUT: %0 = load i32, ptr %value, align 4, !tbaa !47
|
||||
// CHECK:STDOUT: %value2 = getelementptr inbounds nuw %struct.A, ptr %y, i32 0, i32 0
|
||||
// CHECK:STDOUT: %1 = load i32, ptr %value2, align 4, !tbaa !47
|
||||
// CHECK:STDOUT: %cmp = icmp eq i32 %0, %1
|
||||
// CHECK:STDOUT: ret i1 %cmp
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
|
||||
// CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #5
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
||||
// CHECK:STDOUT: define linkonce_odr dso_local noundef zeroext i1 @_Zne1AS_(i32 %x.coerce, i32 %y.coerce) #4 comdat {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %y = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp2 = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %x, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %x.coerce, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive1 = getelementptr inbounds nuw %struct.A, ptr %y, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %y.coerce, ptr %coerce.dive1, align 4
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %x, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp2, ptr align 4 %y, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %coerce.dive3 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %0 = load i32, ptr %coerce.dive3, align 4
|
||||
// CHECK:STDOUT: %coerce.dive4 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp2, i32 0, i32 0
|
||||
// CHECK:STDOUT: %1 = load i32, ptr %coerce.dive4, align 4
|
||||
// CHECK:STDOUT: %call = call noundef zeroext i1 @_Zeq1AS_(i32 %0, i32 %1)
|
||||
// CHECK:STDOUT: %lnot = xor i1 %call, true
|
||||
// CHECK:STDOUT: ret i1 %lnot
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; uselistorder directives
|
||||
// CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 0, 1, 5, 4, 3, 2 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
// CHECK:STDOUT: attributes #2 = { alwaysinline nounwind }
|
||||
// CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT: attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
// CHECK:STDOUT: attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4}
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!5}
|
||||
// CHECK:STDOUT: !llvm.errno.tbaa = !{!7}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
// CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2}
|
||||
// CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2}
|
||||
// CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2}
|
||||
// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !6 = !DIFile(filename: "eq_with.carbon", directory: "")
|
||||
// CHECK:STDOUT: !7 = !{!8, !8, i64 0}
|
||||
// CHECK:STDOUT: !8 = !{!"int", !9, i64 0}
|
||||
// CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0}
|
||||
// CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"}
|
||||
// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Driver", linkageName: "_CDriver.Main", scope: null, file: !6, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15)
|
||||
// CHECK:STDOUT: !12 = !DISubroutineType(types: !13)
|
||||
// CHECK:STDOUT: !13 = !{null, !14, !14}
|
||||
// CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
|
||||
// CHECK:STDOUT: !15 = !{!16, !17}
|
||||
// CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14)
|
||||
// CHECK:STDOUT: !17 = !DILocalVariable(arg: 2, scope: !11, type: !14)
|
||||
// CHECK:STDOUT: !18 = !DILocation(line: 24, column: 3, scope: !11)
|
||||
// CHECK:STDOUT: !19 = !DILocation(line: 23, column: 1, scope: !11)
|
||||
// CHECK:STDOUT: !20 = !{!21, !21, i64 0}
|
||||
// CHECK:STDOUT: !21 = !{!"p1 _ZTS1A", !22, i64 0}
|
||||
// CHECK:STDOUT: !22 = !{!"any pointer", !9, i64 0}
|
||||
// CHECK:STDOUT: !23 = !{!24, !24, i64 0}
|
||||
// CHECK:STDOUT: !24 = !{!"p1 bool", !22, i64 0}
|
||||
// CHECK:STDOUT: !25 = !{i64 0, i64 4, !7}
|
||||
// CHECK:STDOUT: !26 = !{!27, !27, i64 0}
|
||||
// CHECK:STDOUT: !27 = !{!"bool", !9, i64 0}
|
||||
// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Equal", linkageName: "_CEqual:thunk:EqWith.95dfad7558f19bf5.Core:Cpp", scope: null, file: !6, line: 8, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31)
|
||||
// CHECK:STDOUT: !29 = !DISubroutineType(types: !30)
|
||||
// CHECK:STDOUT: !30 = !{!14, !14, !14}
|
||||
// CHECK:STDOUT: !31 = !{!32, !33}
|
||||
// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !28, type: !14)
|
||||
// CHECK:STDOUT: !33 = !DILocalVariable(arg: 2, scope: !28, type: !14)
|
||||
// CHECK:STDOUT: !34 = !DILocation(line: 8, column: 15, scope: !28)
|
||||
// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "NotEqual", linkageName: "_CNotEqual:thunk:EqWith.95dfad7558f19bf5.Core:Cpp", scope: null, file: !6, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36)
|
||||
// CHECK:STDOUT: !36 = !{!37, !38}
|
||||
// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !14)
|
||||
// CHECK:STDOUT: !38 = !DILocalVariable(arg: 2, scope: !35, type: !14)
|
||||
// CHECK:STDOUT: !39 = !DILocation(line: 12, column: 15, scope: !35)
|
||||
// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "CheckEqWith", linkageName: "_CCheckEqWith.Main.795833dfa91e6085", scope: null, file: !6, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41)
|
||||
// CHECK:STDOUT: !41 = !{!42, !43}
|
||||
// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !14)
|
||||
// CHECK:STDOUT: !43 = !DILocalVariable(arg: 2, scope: !40, type: !14)
|
||||
// CHECK:STDOUT: !44 = !DILocation(line: 19, column: 3, scope: !40)
|
||||
// CHECK:STDOUT: !45 = !DILocation(line: 20, column: 3, scope: !40)
|
||||
// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 1, scope: !40)
|
||||
// CHECK:STDOUT: !47 = !{!48, !8, i64 0}
|
||||
// CHECK:STDOUT: !48 = !{!"_ZTS1A", !8, i64 0}
|
||||
// CHECK:STDOUT: ; ModuleID = 'ordered_with.carbon'
|
||||
// CHECK:STDOUT: source_filename = "ordered_with.carbon"
|
||||
// CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
|
||||
// CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: %struct.A = type { i32 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: $_Zlt1AS_ = comdat any
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: $_Zle1AS_ = comdat any
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: $_Zgt1AS_ = comdat any
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: $_Zge1AS_ = comdat any
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CDriver.Main(ptr %x, ptr %y) #0 !dbg !11 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @_CCheckOrderedWith.Main.2434026e6d8bb659(ptr %x, ptr %y), !dbg !18
|
||||
// CHECK:STDOUT: ret void, !dbg !19
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
// CHECK:STDOUT: define internal void @_Zlt1AS_.carbon_thunk(ptr noundef %x, ptr noundef %y, ptr noundef %return) #1 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %y.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp1 = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: store ptr %x, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %y, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %2 = load ptr, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp1, ptr align 4 %2, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %agg.tmp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %3 = load i32, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive2 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp1, i32 0, i32 0
|
||||
// CHECK:STDOUT: %4 = load i32, ptr %coerce.dive2, align 4
|
||||
// CHECK:STDOUT: %call = call noundef zeroext i1 @_Zlt1AS_(i32 %3, i32 %4)
|
||||
// CHECK:STDOUT: %storedv = zext i1 %call to i8
|
||||
// CHECK:STDOUT: store i8 %storedv, ptr %0, align 1, !tbaa !26
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
// CHECK:STDOUT: define internal void @_Zle1AS_.carbon_thunk(ptr noundef %x, ptr noundef %y, ptr noundef %return) #1 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %y.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp1 = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: store ptr %x, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %y, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %2 = load ptr, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp1, ptr align 4 %2, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %agg.tmp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %3 = load i32, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive2 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp1, i32 0, i32 0
|
||||
// CHECK:STDOUT: %4 = load i32, ptr %coerce.dive2, align 4
|
||||
// CHECK:STDOUT: %call = call noundef zeroext i1 @_Zle1AS_(i32 %3, i32 %4)
|
||||
// CHECK:STDOUT: %storedv = zext i1 %call to i8
|
||||
// CHECK:STDOUT: store i8 %storedv, ptr %0, align 1, !tbaa !26
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
// CHECK:STDOUT: define internal void @_Zgt1AS_.carbon_thunk(ptr noundef %x, ptr noundef %y, ptr noundef %return) #1 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %y.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp1 = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: store ptr %x, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %y, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %2 = load ptr, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp1, ptr align 4 %2, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %agg.tmp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %3 = load i32, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive2 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp1, i32 0, i32 0
|
||||
// CHECK:STDOUT: %4 = load i32, ptr %coerce.dive2, align 4
|
||||
// CHECK:STDOUT: %call = call noundef zeroext i1 @_Zgt1AS_(i32 %3, i32 %4)
|
||||
// CHECK:STDOUT: %storedv = zext i1 %call to i8
|
||||
// CHECK:STDOUT: store i8 %storedv, ptr %0, align 1, !tbaa !26
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable
|
||||
// CHECK:STDOUT: define internal void @_Zge1AS_.carbon_thunk(ptr noundef %x, ptr noundef %y, ptr noundef %return) #1 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %y.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %return.addr = alloca ptr, align 8
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp1 = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: store ptr %x, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %y, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !23
|
||||
// CHECK:STDOUT: %1 = load ptr, ptr %x.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %2 = load ptr, ptr %y.addr, align 8, !tbaa !20
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp1, ptr align 4 %2, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %agg.tmp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %3 = load i32, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive2 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp1, i32 0, i32 0
|
||||
// CHECK:STDOUT: %4 = load i32, ptr %coerce.dive2, align 4
|
||||
// CHECK:STDOUT: %call = call noundef zeroext i1 @_Zge1AS_(i32 %3, i32 %4)
|
||||
// CHECK:STDOUT: %storedv = zext i1 %call to i8
|
||||
// CHECK:STDOUT: store i8 %storedv, ptr %0, align 1, !tbaa !26
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
|
||||
// CHECK:STDOUT: define i1 @"_CLess:thunk:OrderedWith.c93a46d484590772.Core:Cpp"(ptr %self, ptr %other) #2 !dbg !28 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.3.temp = alloca i1, align 1, !dbg !34
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.3.temp), !dbg !34
|
||||
// CHECK:STDOUT: call void @_Zlt1AS_.carbon_thunk(ptr %self, ptr %other, ptr %.3.temp), !dbg !34
|
||||
// CHECK:STDOUT: %0 = load i1, ptr %.3.temp, align 1, !dbg !34
|
||||
// CHECK:STDOUT: ret i1 %0, !dbg !34
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
|
||||
// CHECK:STDOUT: define i1 @"_CLessOrEquivalent:thunk:OrderedWith.c93a46d484590772.Core:Cpp"(ptr %self, ptr %other) #2 !dbg !35 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.3.temp = alloca i1, align 1, !dbg !39
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.3.temp), !dbg !39
|
||||
// CHECK:STDOUT: call void @_Zle1AS_.carbon_thunk(ptr %self, ptr %other, ptr %.3.temp), !dbg !39
|
||||
// CHECK:STDOUT: %0 = load i1, ptr %.3.temp, align 1, !dbg !39
|
||||
// CHECK:STDOUT: ret i1 %0, !dbg !39
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
|
||||
// CHECK:STDOUT: define i1 @"_CGreater:thunk:OrderedWith.c93a46d484590772.Core:Cpp"(ptr %self, ptr %other) #2 !dbg !40 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.3.temp = alloca i1, align 1, !dbg !44
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.3.temp), !dbg !44
|
||||
// CHECK:STDOUT: call void @_Zgt1AS_.carbon_thunk(ptr %self, ptr %other, ptr %.3.temp), !dbg !44
|
||||
// CHECK:STDOUT: %0 = load i1, ptr %.3.temp, align 1, !dbg !44
|
||||
// CHECK:STDOUT: ret i1 %0, !dbg !44
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
|
||||
// CHECK:STDOUT: define i1 @"_CGreaterOrEquivalent:thunk:OrderedWith.c93a46d484590772.Core:Cpp"(ptr %self, ptr %other) #2 !dbg !45 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.3.temp = alloca i1, align 1, !dbg !49
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.3.temp), !dbg !49
|
||||
// CHECK:STDOUT: call void @_Zge1AS_.carbon_thunk(ptr %self, ptr %other, ptr %.3.temp), !dbg !49
|
||||
// CHECK:STDOUT: %0 = load i1, ptr %.3.temp, align 1, !dbg !49
|
||||
// CHECK:STDOUT: ret i1 %0, !dbg !49
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CCheckOrderedWith.Main.2434026e6d8bb659(ptr %x, ptr %y) #0 !dbg !50 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Less.call = call i1 @"_CLess:thunk:OrderedWith.c93a46d484590772.Core:Cpp"(ptr %x, ptr %y), !dbg !54
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.call = call i1 @"_CGreater:thunk:OrderedWith.c93a46d484590772.Core:Cpp"(ptr %x, ptr %y), !dbg !55
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.call = call i1 @"_CLessOrEquivalent:thunk:OrderedWith.c93a46d484590772.Core:Cpp"(ptr %x, ptr %y), !dbg !56
|
||||
// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.call = call i1 @"_CGreaterOrEquivalent:thunk:OrderedWith.c93a46d484590772.Core:Cpp"(ptr %x, ptr %y), !dbg !57
|
||||
// CHECK:STDOUT: ret void, !dbg !58
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #3
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
||||
// CHECK:STDOUT: define linkonce_odr dso_local noundef zeroext i1 @_Zlt1AS_(i32 %x.coerce, i32 %y.coerce) #4 comdat {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %y = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %x, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %x.coerce, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive1 = getelementptr inbounds nuw %struct.A, ptr %y, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %y.coerce, ptr %coerce.dive1, align 4
|
||||
// CHECK:STDOUT: %value = getelementptr inbounds nuw %struct.A, ptr %x, i32 0, i32 0
|
||||
// CHECK:STDOUT: %0 = load i32, ptr %value, align 4, !tbaa !59
|
||||
// CHECK:STDOUT: %value2 = getelementptr inbounds nuw %struct.A, ptr %y, i32 0, i32 0
|
||||
// CHECK:STDOUT: %1 = load i32, ptr %value2, align 4, !tbaa !59
|
||||
// CHECK:STDOUT: %cmp = icmp slt i32 %0, %1
|
||||
// CHECK:STDOUT: ret i1 %cmp
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
|
||||
// CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #5
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
||||
// CHECK:STDOUT: define linkonce_odr dso_local noundef zeroext i1 @_Zle1AS_(i32 %x.coerce, i32 %y.coerce) #4 comdat {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %y = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp2 = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %x, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %x.coerce, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive1 = getelementptr inbounds nuw %struct.A, ptr %y, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %y.coerce, ptr %coerce.dive1, align 4
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %y, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp2, ptr align 4 %x, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %coerce.dive3 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %0 = load i32, ptr %coerce.dive3, align 4
|
||||
// CHECK:STDOUT: %coerce.dive4 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp2, i32 0, i32 0
|
||||
// CHECK:STDOUT: %1 = load i32, ptr %coerce.dive4, align 4
|
||||
// CHECK:STDOUT: %call = call noundef zeroext i1 @_Zlt1AS_(i32 %0, i32 %1)
|
||||
// CHECK:STDOUT: %lnot = xor i1 %call, true
|
||||
// CHECK:STDOUT: ret i1 %lnot
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
||||
// CHECK:STDOUT: define linkonce_odr dso_local noundef zeroext i1 @_Zgt1AS_(i32 %x.coerce, i32 %y.coerce) #4 comdat {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %y = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp2 = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %x, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %x.coerce, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive1 = getelementptr inbounds nuw %struct.A, ptr %y, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %y.coerce, ptr %coerce.dive1, align 4
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %y, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp2, ptr align 4 %x, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %coerce.dive3 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %0 = load i32, ptr %coerce.dive3, align 4
|
||||
// CHECK:STDOUT: %coerce.dive4 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp2, i32 0, i32 0
|
||||
// CHECK:STDOUT: %1 = load i32, ptr %coerce.dive4, align 4
|
||||
// CHECK:STDOUT: %call = call noundef zeroext i1 @_Zlt1AS_(i32 %0, i32 %1)
|
||||
// CHECK:STDOUT: ret i1 %call
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable
|
||||
// CHECK:STDOUT: define linkonce_odr dso_local noundef zeroext i1 @_Zge1AS_(i32 %x.coerce, i32 %y.coerce) #4 comdat {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %x = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %y = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %agg.tmp2 = alloca %struct.A, align 4
|
||||
// CHECK:STDOUT: %coerce.dive = getelementptr inbounds nuw %struct.A, ptr %x, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %x.coerce, ptr %coerce.dive, align 4
|
||||
// CHECK:STDOUT: %coerce.dive1 = getelementptr inbounds nuw %struct.A, ptr %y, i32 0, i32 0
|
||||
// CHECK:STDOUT: store i32 %y.coerce, ptr %coerce.dive1, align 4
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %x, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp2, ptr align 4 %y, i64 4, i1 false), !tbaa.struct !25
|
||||
// CHECK:STDOUT: %coerce.dive3 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %0 = load i32, ptr %coerce.dive3, align 4
|
||||
// CHECK:STDOUT: %coerce.dive4 = getelementptr inbounds nuw %struct.A, ptr %agg.tmp2, i32 0, i32 0
|
||||
// CHECK:STDOUT: %1 = load i32, ptr %coerce.dive4, align 4
|
||||
// CHECK:STDOUT: %call = call noundef zeroext i1 @_Zlt1AS_(i32 %0, i32 %1)
|
||||
// CHECK:STDOUT: %lnot = xor i1 %call, true
|
||||
// CHECK:STDOUT: ret i1 %lnot
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; uselistorder directives
|
||||
// CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 3, 2, 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 0, 1, 4, 5, 8, 9, 13, 12, 11, 10, 7, 6, 3, 2 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
// CHECK:STDOUT: attributes #2 = { alwaysinline nounwind }
|
||||
// CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT: attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
|
||||
// CHECK:STDOUT: attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4}
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!5}
|
||||
// CHECK:STDOUT: !llvm.errno.tbaa = !{!7}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
// CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2}
|
||||
// CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2}
|
||||
// CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2}
|
||||
// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !6 = !DIFile(filename: "ordered_with.carbon", directory: "")
|
||||
// CHECK:STDOUT: !7 = !{!8, !8, i64 0}
|
||||
// CHECK:STDOUT: !8 = !{!"int", !9, i64 0}
|
||||
// CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0}
|
||||
// CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"}
|
||||
// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Driver", linkageName: "_CDriver.Main", scope: null, file: !6, line: 33, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15)
|
||||
// CHECK:STDOUT: !12 = !DISubroutineType(types: !13)
|
||||
// CHECK:STDOUT: !13 = !{null, !14, !14}
|
||||
// CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
|
||||
// CHECK:STDOUT: !15 = !{!16, !17}
|
||||
// CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14)
|
||||
// CHECK:STDOUT: !17 = !DILocalVariable(arg: 2, scope: !11, type: !14)
|
||||
// CHECK:STDOUT: !18 = !DILocation(line: 34, column: 3, scope: !11)
|
||||
// CHECK:STDOUT: !19 = !DILocation(line: 33, column: 1, scope: !11)
|
||||
// CHECK:STDOUT: !20 = !{!21, !21, i64 0}
|
||||
// CHECK:STDOUT: !21 = !{!"p1 _ZTS1A", !22, i64 0}
|
||||
// CHECK:STDOUT: !22 = !{!"any pointer", !9, i64 0}
|
||||
// CHECK:STDOUT: !23 = !{!24, !24, i64 0}
|
||||
// CHECK:STDOUT: !24 = !{!"p1 bool", !22, i64 0}
|
||||
// CHECK:STDOUT: !25 = !{i64 0, i64 4, !7}
|
||||
// CHECK:STDOUT: !26 = !{!27, !27, i64 0}
|
||||
// CHECK:STDOUT: !27 = !{!"bool", !9, i64 0}
|
||||
// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Less", linkageName: "_CLess:thunk:OrderedWith.c93a46d484590772.Core:Cpp", scope: null, file: !6, line: 8, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31)
|
||||
// CHECK:STDOUT: !29 = !DISubroutineType(types: !30)
|
||||
// CHECK:STDOUT: !30 = !{!14, !14, !14}
|
||||
// CHECK:STDOUT: !31 = !{!32, !33}
|
||||
// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !28, type: !14)
|
||||
// CHECK:STDOUT: !33 = !DILocalVariable(arg: 2, scope: !28, type: !14)
|
||||
// CHECK:STDOUT: !34 = !DILocation(line: 8, column: 15, scope: !28)
|
||||
// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "LessOrEquivalent", linkageName: "_CLessOrEquivalent:thunk:OrderedWith.c93a46d484590772.Core:Cpp", scope: null, file: !6, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36)
|
||||
// CHECK:STDOUT: !36 = !{!37, !38}
|
||||
// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !14)
|
||||
// CHECK:STDOUT: !38 = !DILocalVariable(arg: 2, scope: !35, type: !14)
|
||||
// CHECK:STDOUT: !39 = !DILocation(line: 16, column: 15, scope: !35)
|
||||
// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Greater", linkageName: "_CGreater:thunk:OrderedWith.c93a46d484590772.Core:Cpp", scope: null, file: !6, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41)
|
||||
// CHECK:STDOUT: !41 = !{!42, !43}
|
||||
// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !14)
|
||||
// CHECK:STDOUT: !43 = !DILocalVariable(arg: 2, scope: !40, type: !14)
|
||||
// CHECK:STDOUT: !44 = !DILocation(line: 12, column: 15, scope: !40)
|
||||
// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "GreaterOrEquivalent", linkageName: "_CGreaterOrEquivalent:thunk:OrderedWith.c93a46d484590772.Core:Cpp", scope: null, file: !6, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46)
|
||||
// CHECK:STDOUT: !46 = !{!47, !48}
|
||||
// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !14)
|
||||
// CHECK:STDOUT: !48 = !DILocalVariable(arg: 2, scope: !45, type: !14)
|
||||
// CHECK:STDOUT: !49 = !DILocation(line: 20, column: 15, scope: !45)
|
||||
// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "CheckOrderedWith", linkageName: "_CCheckOrderedWith.Main.2434026e6d8bb659", scope: null, file: !6, line: 26, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51)
|
||||
// CHECK:STDOUT: !51 = !{!52, !53}
|
||||
// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !50, type: !14)
|
||||
// CHECK:STDOUT: !53 = !DILocalVariable(arg: 2, scope: !50, type: !14)
|
||||
// CHECK:STDOUT: !54 = !DILocation(line: 27, column: 3, scope: !50)
|
||||
// CHECK:STDOUT: !55 = !DILocation(line: 28, column: 3, scope: !50)
|
||||
// CHECK:STDOUT: !56 = !DILocation(line: 29, column: 3, scope: !50)
|
||||
// CHECK:STDOUT: !57 = !DILocation(line: 30, column: 3, scope: !50)
|
||||
// CHECK:STDOUT: !58 = !DILocation(line: 26, column: 1, scope: !50)
|
||||
// CHECK:STDOUT: !59 = !{!60, !8, i64 0}
|
||||
// CHECK:STDOUT: !60 = !{!"_ZTS1A", !8, i64 0}
|
||||
@@ -25,6 +25,7 @@ CARBON_SEM_IR_CORE_INTERFACE_KIND(Default)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(Destroy)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(DivAssignWith)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(DivWith)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(EqWith)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(Inc)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(IntFitsIn)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(ModAssignWith)
|
||||
@@ -32,6 +33,7 @@ CARBON_SEM_IR_CORE_INTERFACE_KIND(ModWith)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(MulAssignWith)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(MulWith)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(Negate)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(OrderedWith)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(SubAssignWith)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(SubWith)
|
||||
|
||||
@@ -39,5 +41,6 @@ CARBON_SEM_IR_CORE_INTERFACE_KIND(SubWith)
|
||||
CARBON_SEM_IR_CORE_INTERFACE_KIND(Unknown)
|
||||
#endif // CARBON_SEM_IR_CORE_INTERFACE_EXCLUDE_UNKNOWN
|
||||
|
||||
#undef CARBON_SEM_IR_CORE_INTERFACE_EXCLUDE_UNKNOWN
|
||||
#undef CARBON_SEM_IR_CORE_INTERFACE_KIND
|
||||
#undef CARBON_SEM_IR_CORE_INTERFACE_EXCLUDE_UNKNOWN
|
||||
|
||||
Reference in New Issue
Block a user