[llvm] [AMDGPU] Switch V_CNDMASK operands to shrink it into VOP2 (PR #135162)
Mirko BrkuĊĦanin via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 05:31:51 PDT 2025
================
@@ -871,25 +871,41 @@ unsigned SIShrinkInstructions::getInverseCompareOpcode(MachineInstr &MI) const {
return AMDGPU::V_CMP_EQ_F32_e64;
case AMDGPU::V_CMP_GE_F32_e64:
return AMDGPU::V_CMP_NGE_F32_e64;
+ case AMDGPU::V_CMP_NGE_F32_e64:
+ return AMDGPU::V_CMP_GE_F32_e64;
case AMDGPU::V_CMP_LE_F32_e64:
return AMDGPU::V_CMP_NLE_F32_e64;
+ case AMDGPU::V_CMP_NLE_F32_e32:
+ return AMDGPU::V_CMP_LE_F32_e32;
case AMDGPU::V_CMP_GT_F32_e64:
return AMDGPU::V_CMP_NGT_F32_e64;
+ case AMDGPU::V_CMP_NGT_F32_e64:
+ return AMDGPU::V_CMP_GT_F32_e64;
case AMDGPU::V_CMP_LT_F32_e64:
return AMDGPU::V_CMP_NLT_F32_e64;
+ case AMDGPU::V_CMP_NLT_F32_e64:
+ return AMDGPU::V_CMP_LT_F32_e64;
// float 64
case AMDGPU::V_CMP_EQ_F64_e64:
return AMDGPU::V_CMP_NEQ_F64_e64;
case AMDGPU::V_CMP_NEQ_F64_e64:
return AMDGPU::V_CMP_EQ_F64_e64;
case AMDGPU::V_CMP_GE_F64_e64:
return AMDGPU::V_CMP_NGE_F64_e64;
+ case AMDGPU::V_CMP_NGE_F64_e64:
+ return AMDGPU::V_CMP_GE_F32_e64;
case AMDGPU::V_CMP_LE_F64_e64:
return AMDGPU::V_CMP_NLE_F64_e64;
+ case AMDGPU::V_CMP_NLE_F64_e32:
+ return AMDGPU::V_CMP_LE_F64_e32;
case AMDGPU::V_CMP_GT_F64_e64:
return AMDGPU::V_CMP_NGT_F64_e64;
+ case AMDGPU::V_CMP_NGT_F64_e64:
+ return AMDGPU::V_CMP_GT_F32_e64;
case AMDGPU::V_CMP_LT_F64_e64:
return AMDGPU::V_CMP_NLT_F64_e64;
+ case AMDGPU::V_CMP_NLT_F64_e64:
+ return AMDGPU::V_CMP_LT_F64_e64;
----------------
mbrkusanin wrote:
Missing:
V_CMP_LG_F*
V_CMP_NLG_F*
V_CMP_O_F*
V_CMP_U_F*
https://github.com/llvm/llvm-project/pull/135162
More information about the llvm-commits
mailing list