Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-10518] Integer overflow checks prevent loop unrolling #52918

Closed
TellowKrinkle opened this issue Apr 19, 2019 · 2 comments
Closed

[SR-10518] Integer overflow checks prevent loop unrolling #52918

TellowKrinkle opened this issue Apr 19, 2019 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself performance

Comments

@TellowKrinkle
Copy link

Previous ID SR-10518
Radar rdar://problem/50054299
Original Reporter @TellowKrinkle
Type Bug
Status Resolved
Resolution Won't Do
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Performance
Assignee None
Priority Medium

md5: 5ab0700095dc228277ef2731e36eac67

Issue Description:

When compiling loops like an array sum, the presence of overflow checks causes the compiler to not unroll loops as shown here

More info here

@belkadan
Copy link
Contributor

cc @bob-wilson

@eeckstein
Copy link
Member

The important optimization is mainly vectorization (and not loop unrolling) as discussed here: https://forums.swift.org/t/loop-unrolling-optimization/23344

We will not add vectorization for overflow checks in the SIL optimizer.
The way to solve this is to use non-overflow-checking operators, like discussed in the forum thread.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself performance
Projects
None yet
Development

No branches or pull requests

3 participants