mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fix licm handling of unreferenceable storage.
This commit is contained in:
@@ -587,10 +587,13 @@ private extension AnalyzedInstructions {
|
||||
continue
|
||||
}
|
||||
|
||||
if let splitLoads = loadInst.trySplit(alongPath: accessPath.projectionPath, context) {
|
||||
splitCounter += splitLoads.count
|
||||
newLoads.append(contentsOf: splitLoads)
|
||||
guard let splitLoads = loadInst.trySplit(alongPath: accessPath.projectionPath, context) else {
|
||||
newLoads.push(loadInst)
|
||||
return false
|
||||
}
|
||||
|
||||
splitCounter += splitLoads.count
|
||||
newLoads.append(contentsOf: splitLoads)
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -high-level-licm | %FileCheck %s
|
||||
// RUN: %target-sil-opt -enable-sil-verify-all %s -loop-invariant-code-motion | %FileCheck %s
|
||||
|
||||
sil_stage canonical
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-sil-opt -sil-print-types -enable-sil-verify-all %s -licm | %FileCheck %s
|
||||
// RUN: %target-sil-opt -sil-print-types -enable-sil-verify-all %s -loop-invariant-code-motion | %FileCheck %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user