-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[AMDGPU] Reland "Remove redundant s_cmp_lg_* sX, 0" #164201
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
Changes from 2 commits
1439b49
5c801f6
706ec85
5c787c0
f18fabf
8c036ef
3518318
96e16d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -709,6 +709,31 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo { | |
| } | ||
| } | ||
|
|
||
| static bool setsSCCifResultIsNonZero(const MachineInstr &MI) { | ||
| if (!MI.findRegisterDefOperand(AMDGPU::SCC, /*TRI=*/nullptr)) | ||
| return false; | ||
| // Compares have no result | ||
| if (MI.isCompare()) | ||
| return false; | ||
| switch (MI.getOpcode()) { | ||
| default: | ||
| return true; | ||
| case AMDGPU::S_ADD_I32: | ||
| case AMDGPU::S_ADD_U32: | ||
| case AMDGPU::S_ADDC_U32: | ||
| case AMDGPU::S_SUB_I32: | ||
| case AMDGPU::S_SUB_U32: | ||
| case AMDGPU::S_SUBB_U32: | ||
| case AMDGPU::S_MIN_I32: | ||
| case AMDGPU::S_MIN_U32: | ||
| case AMDGPU::S_MAX_I32: | ||
| case AMDGPU::S_MAX_U32: | ||
| case AMDGPU::S_ADDK_I32: | ||
| case AMDGPU::SI_PC_ADD_REL_OFFSET: | ||
|
||
| return false; | ||
| } | ||
| } | ||
|
|
||
| static bool isEXP(const MachineInstr &MI) { | ||
| return MI.getDesc().TSFlags & SIInstrFlags::EXP; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.