-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[AArch64][LV][SLP] Vectorizers use call cost for vectorized frem #82488
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
Merged
paschalis-mpeis
merged 8 commits into
main
from
users/paschalis-mpeis/frem-slp-vectorization
Mar 14, 2024
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
abe1b4e
SLP cannot vectorize frem calls in AArch64.
paschalis-mpeis 36ce5eb
[AArch64] SLP can vectorize frem
paschalis-mpeis 3ed8acc
Addressing reviewers
paschalis-mpeis 34bbbf8
[LV][SLP] Vectorizers now use getFRemInstrCost for frem costs
paschalis-mpeis ecd7da7
Addressing reviewers (2)
paschalis-mpeis 6d508fb
[AArch64][LV][SLP] Vectorizers use call cost for vectorized frem
paschalis-mpeis 97a2ad9
Addressing reviewers (3)
paschalis-mpeis 05c1986
Addressing reviewers (4)
paschalis-mpeis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 | ||
; RUN: opt < %s -S -mtriple=aarch64 -vector-library=ArmPL -passes=slp-vectorizer | FileCheck %s | ||
|
||
@a = common global ptr null, align 8 | ||
|
||
define void @frem_v2double() { | ||
; CHECK-LABEL: define void @frem_v2double() { | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: [[TMP0:%.*]] = load <2 x double>, ptr @a, align 8 | ||
; CHECK-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @a, align 8 | ||
; CHECK-NEXT: [[TMP2:%.*]] = frem <2 x double> [[TMP0]], [[TMP1]] | ||
; CHECK-NEXT: store <2 x double> [[TMP2]], ptr @a, align 8 | ||
; CHECK-NEXT: ret void | ||
; | ||
entry: | ||
%a0 = load double, ptr getelementptr inbounds (double, ptr @a, i64 0), align 8 | ||
%a1 = load double, ptr getelementptr inbounds (double, ptr @a, i64 1), align 8 | ||
%b0 = load double, ptr getelementptr inbounds (double, ptr @a, i64 0), align 8 | ||
%b1 = load double, ptr getelementptr inbounds (double, ptr @a, i64 1), align 8 | ||
%r0 = frem double %a0, %b0 | ||
%r1 = frem double %a1, %b1 | ||
store double %r0, ptr getelementptr inbounds (double, ptr @a, i64 0), align 8 | ||
store double %r1, ptr getelementptr inbounds (double, ptr @a, i64 1), align 8 | ||
ret void | ||
} | ||
|
||
define void @frem_v4float() { | ||
; CHECK-LABEL: define void @frem_v4float() { | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: [[TMP0:%.*]] = load <4 x float>, ptr @a, align 8 | ||
; CHECK-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @a, align 8 | ||
; CHECK-NEXT: [[TMP2:%.*]] = frem <4 x float> [[TMP0]], [[TMP1]] | ||
; CHECK-NEXT: store <4 x float> [[TMP2]], ptr @a, align 8 | ||
; CHECK-NEXT: ret void | ||
; | ||
entry: | ||
%a0 = load float, ptr getelementptr inbounds (float, ptr @a, i64 0), align 8 | ||
%a1 = load float, ptr getelementptr inbounds (float, ptr @a, i64 1), align 8 | ||
%a2 = load float, ptr getelementptr inbounds (float, ptr @a, i64 2), align 8 | ||
%a3 = load float, ptr getelementptr inbounds (float, ptr @a, i64 3), align 8 | ||
%b0 = load float, ptr getelementptr inbounds (float, ptr @a, i64 0), align 8 | ||
%b1 = load float, ptr getelementptr inbounds (float, ptr @a, i64 1), align 8 | ||
%b2 = load float, ptr getelementptr inbounds (float, ptr @a, i64 2), align 8 | ||
%b3 = load float, ptr getelementptr inbounds (float, ptr @a, i64 3), align 8 | ||
%r0 = frem float %a0, %b0 | ||
%r1 = frem float %a1, %b1 | ||
%r2 = frem float %a2, %b2 | ||
%r3 = frem float %a3, %b3 | ||
store float %r0, ptr getelementptr inbounds (float, ptr @a, i64 0), align 8 | ||
store float %r1, ptr getelementptr inbounds (float, ptr @a, i64 1), align 8 | ||
store float %r2, ptr getelementptr inbounds (float, ptr @a, i64 2), align 8 | ||
store float %r3, ptr getelementptr inbounds (float, ptr @a, i64 3), align 8 | ||
ret void | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.