test/SILOptimizer/pointer_conversion.swift’s arrayLiteralPromotion() subtest uses integer literals for 41, 42, 43, and 44. If swift-evolve shuffles a particular _internalInvariant() call in stdlib/public/core/BridgeStorage.swift to lines 41-44, the compiler will generate code which reuses the integer_literal instruction for the line number later in the test, causing this test to fail. This happens about once per 45 runs of swift-evolve.
This change negates the integer literals so they will never match a line number.
* Implement a few silcombine transformations for arrays
- Useless existential_ref <-> class conversions.
- mark_dependence_inst depending on uninteresting instructions.
- release(init_existential_ref(x)) -> release(x) when hasOneUse(x)
- Update COWArrayOpt to handle the new forms generated by this.
these aren't massive performance wins, but do shrink the size of SIL when
dealing with arrays.
* Generalize testcase to work on linux and on mac when checking stdlib is enabled.
I looked at trying to make the matches more flexible, but there are
actually some suspicious bits that I'm not so sure about. I'll just
disable the test for now.
rdar://problem/33531741
The array or string has to be kept alive past the call. John fixed
this back in 733915f but I want to make sure it doesn't regress.
rdar://problem/31325077 (originally fixed as rdar://problem/31542269,
also reported as SR-3231)