-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[AMDGPU] si-peephole-sdwa: Disable V_CNDMASK_B32 conversion with sext #140760
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
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a035402
[AMDGPU] si-peephole-sdwa: Disable V_CNDMASK conversion with sext
frederik-h 6761e1b
Extend comment on SISrcMods and make FIXME more explicit
frederik-h e3d9f82
Simplify test
frederik-h f6d7513
Update llvm/test/CodeGen/AMDGPU/sdwa-peephole-cndmask-sext.ll
frederik-h f7b8411
Move test case into existing test file
frederik-h 0a887bf
Reintroduce IR test
frederik-h 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 | ||
| ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx942 < %s | FileCheck %s | ||
| ; XFAIL: * | ||
frederik-h marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ; FIXME The sext modifier is turned into a neg modifier in the asm output | ||
|
|
||
| define void @widget(ptr addrspace(7) %arg, <1 x i1> %arg1, <1 x i1> %arg2) #0 { | ||
| ; CHECK-LABEL: widget: | ||
| ; CHECK: ; %bb.0: ; %bb | ||
| ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
| ; CHECK-NEXT: s_mov_b32 s0, 0 | ||
| ; CHECK-NEXT: s_mov_b32 s1, s0 | ||
| ; CHECK-NEXT: s_mov_b32 s2, s0 | ||
| ; CHECK-NEXT: s_mov_b32 s3, s0 | ||
| ; CHECK-NEXT: buffer_load_ubyte v0, off, s[0:3], 0 | ||
| ; CHECK-NEXT: v_and_b32_e32 v1, 1, v5 | ||
| ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v1 | ||
| ; CHECK-NEXT: v_mov_b32_e32 v1, 0 | ||
| ; CHECK-NEXT: s_and_saveexec_b64 s[0:1], vcc | ||
| ; CHECK-NEXT: ; %bb.1: ; %cond.load | ||
| ; CHECK-NEXT: v_mov_b32_e32 v1, 0 | ||
| ; CHECK-NEXT: ds_read_b32 v1, v1 | ||
| ; CHECK-NEXT: ; %bb.2: ; %else | ||
| ; CHECK-NEXT: s_or_b64 exec, exec, s[0:1] | ||
| ; CHECK-NEXT: s_and_saveexec_b64 s[0:1], vcc | ||
| ; CHECK-NEXT: s_cbranch_execz .LBB0_4 | ||
| ; CHECK-NEXT: ; %bb.3: ; %cond.store | ||
| ; CHECK-NEXT: v_mov_b32_e32 v2, 0 | ||
| ; CHECK-NEXT: s_waitcnt vmcnt(0) | ||
| ; CHECK-NEXT: v_cndmask_b32_sdwa v0, v2, sext(v0), vcc dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:BYTE_0 | ||
| ; CHECK-NEXT: s_waitcnt lgkmcnt(0) | ||
| ; CHECK-NEXT: v_or_b32_e32 v0, v0, v1 | ||
| ; CHECK-NEXT: ds_write_b32 v2, v0 | ||
| ; CHECK-NEXT: .LBB0_4: ; %else1 | ||
| ; CHECK-NEXT: s_or_b64 exec, exec, s[0:1] | ||
| ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) | ||
| ; CHECK-NEXT: s_setpc_b64 s[30:31] | ||
| bb: | ||
| %load = load <1 x i8>, ptr addrspace(7) null, align 1 | ||
| %sext = sext <1 x i8> %load to <1 x i32> | ||
| %select = select <1 x i1> %arg1, <1 x i32> %sext, <1 x i32> zeroinitializer | ||
| %call = tail call <1 x i32> @llvm.masked.load.v1i32.p3(ptr addrspace(3) null, i32 1, <1 x i1> %arg1, <1 x i32> zeroinitializer) | ||
| %or = or <1 x i32> %select, %call | ||
| tail call void @llvm.masked.store.v1i32.p3(<1 x i32> %or, ptr addrspace(3) null, i32 1, <1 x i1> %arg1) | ||
frederik-h marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| tail call void @llvm.amdgcn.s.waitcnt(i32 0) | ||
| ret void | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.