-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[AMDGPU] Add freeze for LowerSELECT #148796
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
Shoreshen
merged 15 commits into
llvm:main
from
Shoreshen:insert-freeze-for-select-isel
Jul 18, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1164140
Add freeze for LowerSELECT
Shoreshen 832e5bb
fix fomat && matthew's comment
Shoreshen 8cb4e26
fix removed assert
Shoreshen a6193cb
fix rssimon's comment
Shoreshen 097b5ca
fis simon's comment && try remove undef
Shoreshen 2cacfea
Update llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Shoreshen 2bac92f
Merge branch 'main' into insert-freeze-for-select-isel
Shoreshen 568e2bd
Merge branch 'main' into insert-freeze-for-select-isel
Shoreshen f6aa7f3
fabs cannot create undef/poison
Shoreshen 93b387b
fix test case
Shoreshen 6fdc263
fix ABS
Shoreshen dfe3c1f
fix format
Shoreshen 9820f4a
revert fabs changes and put in saperate PR
Shoreshen d488fcc
Merge branch 'main' into insert-freeze-for-select-isel
Shoreshen b8ddfaf
Merge branch 'main' into insert-freeze-for-select-isel
Shoreshen 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3272,9 +3272,10 @@ define double @v_fmaximum3_f64_fabs0(double %a, double %b, double %c) { | |
; GFX9-LABEL: v_fmaximum3_f64_fabs0: | ||
; GFX9: ; %bb.0: | ||
; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
; GFX9-NEXT: v_max_f64 v[6:7], |v[0:1]|, v[2:3] | ||
; GFX9-NEXT: v_and_b32_e32 v1, 0x7fffffff, v1 | ||
; GFX9-NEXT: v_max_f64 v[6:7], v[0:1], v[2:3] | ||
; GFX9-NEXT: v_mov_b32_e32 v8, 0x7ff80000 | ||
; GFX9-NEXT: v_cmp_u_f64_e64 vcc, |v[0:1]|, v[2:3] | ||
; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[2:3] | ||
; GFX9-NEXT: s_nop 1 | ||
Comment on lines
+3275
to
3279
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you make sure all of these FP ops correctly report they can't introduce poison in a separate PR? |
||
; GFX9-NEXT: v_cndmask_b32_e32 v1, v7, v8, vcc | ||
; GFX9-NEXT: v_cndmask_b32_e64 v0, v6, 0, vcc | ||
|
@@ -3306,9 +3307,10 @@ define double @v_fmaximum3_f64_fabs1(double %a, double %b, double %c) { | |
; GFX9-LABEL: v_fmaximum3_f64_fabs1: | ||
; GFX9: ; %bb.0: | ||
; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
; GFX9-NEXT: v_max_f64 v[6:7], v[0:1], |v[2:3]| | ||
; GFX9-NEXT: v_and_b32_e32 v3, 0x7fffffff, v3 | ||
; GFX9-NEXT: v_max_f64 v[6:7], v[0:1], v[2:3] | ||
; GFX9-NEXT: v_mov_b32_e32 v8, 0x7ff80000 | ||
; GFX9-NEXT: v_cmp_u_f64_e64 vcc, v[0:1], |v[2:3]| | ||
; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[2:3] | ||
; GFX9-NEXT: s_nop 1 | ||
; GFX9-NEXT: v_cndmask_b32_e32 v1, v7, v8, vcc | ||
; GFX9-NEXT: v_cndmask_b32_e64 v0, v6, 0, vcc | ||
|
@@ -3343,11 +3345,12 @@ define double @v_fmaximum3_f64_fabs2(double %a, double %b, double %c) { | |
; GFX9-NEXT: v_max_f64 v[6:7], v[0:1], v[2:3] | ||
; GFX9-NEXT: v_mov_b32_e32 v8, 0x7ff80000 | ||
; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[2:3] | ||
; GFX9-NEXT: s_nop 1 | ||
; GFX9-NEXT: v_and_b32_e32 v5, 0x7fffffff, v5 | ||
; GFX9-NEXT: s_nop 0 | ||
; GFX9-NEXT: v_cndmask_b32_e32 v1, v7, v8, vcc | ||
; GFX9-NEXT: v_cndmask_b32_e64 v0, v6, 0, vcc | ||
; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], |v[4:5]| | ||
; GFX9-NEXT: v_cmp_u_f64_e64 vcc, v[0:1], |v[4:5]| | ||
; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], v[4:5] | ||
; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[4:5] | ||
; GFX9-NEXT: s_nop 1 | ||
; GFX9-NEXT: v_cndmask_b32_e64 v0, v2, 0, vcc | ||
; GFX9-NEXT: v_cndmask_b32_e32 v1, v3, v8, vcc | ||
|
@@ -3374,14 +3377,17 @@ define double @v_fmaximum3_f64_fabs_all(double %a, double %b, double %c) { | |
; GFX9-LABEL: v_fmaximum3_f64_fabs_all: | ||
; GFX9: ; %bb.0: | ||
; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
; GFX9-NEXT: v_max_f64 v[6:7], |v[0:1]|, |v[2:3]| | ||
; GFX9-NEXT: v_and_b32_e32 v1, 0x7fffffff, v1 | ||
; GFX9-NEXT: v_and_b32_e32 v3, 0x7fffffff, v3 | ||
; GFX9-NEXT: v_max_f64 v[6:7], v[0:1], v[2:3] | ||
; GFX9-NEXT: v_mov_b32_e32 v8, 0x7ff80000 | ||
; GFX9-NEXT: v_cmp_u_f64_e64 vcc, |v[0:1]|, |v[2:3]| | ||
; GFX9-NEXT: s_nop 1 | ||
; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[2:3] | ||
; GFX9-NEXT: v_and_b32_e32 v5, 0x7fffffff, v5 | ||
; GFX9-NEXT: s_nop 0 | ||
; GFX9-NEXT: v_cndmask_b32_e32 v1, v7, v8, vcc | ||
; GFX9-NEXT: v_cndmask_b32_e64 v0, v6, 0, vcc | ||
; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], |v[4:5]| | ||
; GFX9-NEXT: v_cmp_u_f64_e64 vcc, v[0:1], |v[4:5]| | ||
; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], v[4:5] | ||
; GFX9-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[4:5] | ||
; GFX9-NEXT: s_nop 1 | ||
; GFX9-NEXT: v_cndmask_b32_e64 v0, v2, 0, vcc | ||
; GFX9-NEXT: v_cndmask_b32_e32 v1, v3, v8, vcc | ||
|
@@ -3446,14 +3452,17 @@ define double @v_fmaximum3_f64_fneg_fabs_all(double %a, double %b, double %c) { | |
; GFX9-LABEL: v_fmaximum3_f64_fneg_fabs_all: | ||
; GFX9: ; %bb.0: | ||
; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
; GFX9-NEXT: v_max_f64 v[6:7], -|v[0:1]|, -|v[2:3]| | ||
; GFX9-NEXT: v_and_b32_e32 v1, 0x7fffffff, v1 | ||
; GFX9-NEXT: v_and_b32_e32 v3, 0x7fffffff, v3 | ||
; GFX9-NEXT: v_max_f64 v[6:7], -v[0:1], -v[2:3] | ||
; GFX9-NEXT: v_mov_b32_e32 v8, 0x7ff80000 | ||
; GFX9-NEXT: v_cmp_u_f64_e64 vcc, -|v[0:1]|, -|v[2:3]| | ||
; GFX9-NEXT: s_nop 1 | ||
; GFX9-NEXT: v_cmp_u_f64_e64 vcc, -v[0:1], -v[2:3] | ||
; GFX9-NEXT: v_and_b32_e32 v5, 0x7fffffff, v5 | ||
; GFX9-NEXT: s_nop 0 | ||
; GFX9-NEXT: v_cndmask_b32_e32 v1, v7, v8, vcc | ||
; GFX9-NEXT: v_cndmask_b32_e64 v0, v6, 0, vcc | ||
; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], -|v[4:5]| | ||
; GFX9-NEXT: v_cmp_u_f64_e64 vcc, v[0:1], -|v[4:5]| | ||
; GFX9-NEXT: v_max_f64 v[2:3], v[0:1], -v[4:5] | ||
; GFX9-NEXT: v_cmp_u_f64_e64 vcc, v[0:1], -v[4:5] | ||
; GFX9-NEXT: s_nop 1 | ||
; GFX9-NEXT: v_cndmask_b32_e64 v0, v2, 0, vcc | ||
; GFX9-NEXT: v_cndmask_b32_e32 v1, v3, v8, vcc | ||
|
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did these split when the output is identical?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't currently a common GCN prefix for the llc RUNs - I think it got removed when the file was regenerated and we didn't have any uses of it.