Skip to content

Tuple equality: remember which temps are never null and optimize lowering further #25487

@jcouv

Description

@jcouv

In RewriteTupleNestedOperators:

            // PROTOTYPE(tuple-equality) Consider if optimizations from TrivialLiftedComparisonOperatorOptimizations can be applied
...

            // Note: left and right are either temps or `null`, so we don't have detailed information to tell us a nullable always has a value
            // PROTOTYPE(tuple-equality) We could save this information when the temps are created
            var isLeftNullable = left.Kind != BoundKind.TupleLiteral && left.Type.IsNullableType();
            if (isLeftNullable)
            {

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions