File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -3569,16 +3569,16 @@ void IRGenSILFunction::visitRefTailAddrInst(RefTailAddrInst *i) {
3569
3569
3570
3570
static bool isInvariantAddress (SILValue v) {
3571
3571
SILValue accessedAddress = getAccessedAddress (v);
3572
- if (accessedAddress->getType ().isAddress () && isLetAddress (accessedAddress)) {
3573
- return true ;
3574
- }
3575
3572
if (auto *ptrRoot = dyn_cast<PointerToAddressInst>(accessedAddress)) {
3576
3573
return ptrRoot->isInvariant ();
3577
3574
}
3578
3575
// TODO: We could be more aggressive about considering addresses based on
3579
3576
// `let` variables as invariant when the type of the address is known not to
3580
3577
// have any sharably-mutable interior storage (in other words, no weak refs,
3581
- // atomics, etc.)
3578
+ // atomics, etc.). However, this currently miscompiles some programs.
3579
+ // if (accessedAddress->getType().isAddress() && isLetAddress(accessedAddress)) {
3580
+ // return true;
3581
+ // }
3582
3582
return false ;
3583
3583
}
3584
3584
Original file line number Diff line number Diff line change 1
1
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
2
2
3
+ // REQUIRES: rdar60068448
4
+ // FIXME Reenable the !invariant.load metadata after debugging miscompiles...
5
+ // <rdar://60068448> Teach IRGen to emit !invariant metadata for 'let' variables
6
+
3
7
sil_stage lowered
4
8
5
9
import Builtin
You can’t perform that action at this time.
0 commit comments