Skip to content

Commit 0d0bf13

Browse files
committed
Fix a thinko
1 parent 508af6b commit 0d0bf13

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

include/swift/SIL/SILInstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ struct SILDebugVariable {
18111811
bool operator==(const SILDebugVariable &V) {
18121812
return ArgNo == V.ArgNo && Constant == V.Constant && Name == V.Name &&
18131813
Implicit == V.Implicit && Type == V.Type && Loc == V.Loc &&
1814-
Scope == V.Scope && DIExpr == DIExpr;
1814+
Scope == V.Scope && DIExpr == V.DIExpr;
18151815
}
18161816

18171817
bool isLet() const { return Name.size() && Constant; }

test/SILOptimizer/specialize_unconditional_checked_cast.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,13 @@ ArchetypeToConcreteConvertUInt8(t: c)
9797
ArchetypeToConcreteConvertUInt8(t: f)
9898

9999
// x -> x where x is not a class.
100+
//
101+
// TODO: Why is the optimizer cloning twice here.
102+
//
100103
// CHECK-LABEL: sil shared [noinline] @$s37specialize_unconditional_checked_cast31ArchetypeToConcreteConvertUInt8{{[_0-9a-zA-Z]*}}3Not{{.*}}Tg5 : $@convention(thin) (NotUInt8) -> NotUInt8 {
101104
// CHECK: bb0
102105
// CHECK-NEXT: debug_value %0
106+
// CHECK-NEXT: debug_value %0
103107
// CHECK-NEXT: return %0
104108

105109
// x -> y where y is a class but x is not.
@@ -120,6 +124,7 @@ ArchetypeToConcreteConvertUInt8(t: f)
120124
// CHECK-LABEL: sil shared [noinline] @$s37specialize_unconditional_checked_cast27ArchetypeToConcreteConvertC{{[_0-9a-zA-Z]*}}Tg5 : $@convention(thin) (@guaranteed C) -> @owned C {
121125
// CHECK: bb0([[ARG:%.*]] : $C)
122126
// CHECK-NEXT: debug_value [[ARG]]
127+
// CHECK-NEXT: debug_value [[ARG]]
123128
// CHECK-NEXT: strong_retain [[ARG]]
124129
// CHECK-NEXT: return [[ARG]]
125130

0 commit comments

Comments
 (0)