Skip to content

Commit 8739bef

Browse files
committed
AccessUtils: let two tail-access bases with the same reference root be equivalent
This is possible now because projection path now models index-addressing correctly.
1 parent 80778de commit 8739bef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

SwiftCompilerSources/Sources/Optimizer/Utilities/AccessUtils.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ enum AccessBase : CustomStringConvertible, Hashable {
175175
case (.class(let rea1), .class(let rea2)):
176176
return rea1.fieldIndex == rea2.fieldIndex &&
177177
rea1.instance.referenceRoot == rea2.instance.referenceRoot
178+
case (.tail(let rta1), .tail(let rta2)):
179+
return rta1.instance.referenceRoot == rta2.instance.referenceRoot &&
180+
rta1.type == rta2.type
178181
case (.stack(let as1), .stack(let as2)):
179182
return as1 == as2
180183
case (.global(let gl1), .global(let gl2)):

0 commit comments

Comments
 (0)