Commit Graph

10 Commits

Author SHA1 Message Date
Artem Chikin
918ae4ad47 Merge pull request #81033 from artemcm/62OptimizedStdLibTestRestrict
[6.2 🍒][Test Only] Restrict '@const' test to optimized-stdlib builds
2025-04-28 17:46:50 -07:00
Anthony Latsis
6e94080c93 AST: Quote attributes more consistently in DiagnosticsCommon.def 2025-04-23 19:18:11 +01:00
Artem Chikin
7534054682 [Test Only] Restrict '@const' test to optimized-stdlib builds 2025-04-23 09:39:39 -07:00
Erik Eckstein
4d1df28de0 ConstantFolding: add constant folding for some floating point intrinsics
* `sitofp` signed integer to floating point
* `rint` round floating point to integral
* `bitcast` between integer and floating point

Constant folding `bitcast`s also made it necessary to rewrite constant folding for Nan and inf values, because the old code explicitly checked for `bitcast` intrinsics.
Relying on constant folded `bitcast`s makes the new version much simpler.

It is important to constant fold these intrinsics already in SIL because it enables other optimizations.
2025-04-01 18:13:01 +02:00
Artem Chikin
281f84da0f [Compile Time Values] Rewrite the 'Diagnose Unknown Compile Time Values' diagnostic pass in Swift 2025-03-28 10:30:07 -07:00
Artem Chikin
5753603472 [Compile Time Values] Mark currently-failing tests with requirement annotations 2025-03-27 14:33:38 -07:00
Artem Chikin
ac60612242 [Compile Time Values] Emit diagnostic note with parameter location on a non-@const argument to a @const parameter 2025-03-27 14:33:38 -07:00
Artem Chikin
114af54875 [Compile Time Values] Rebase on top of newly-added experimental feature for the '@const' attribute 2025-03-27 14:33:38 -07:00
Kuba Mracek
b8ef3ff779 Add test/ConstValues/Conditions.swift 2025-03-27 14:33:37 -07:00
Kuba Mracek
a925d6af20 Add tests 2025-03-27 14:33:37 -07:00