From 7ec044c97be0842c07a1232d186d7c3f07d9a2eb Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 23 Mar 2015 18:45:35 +0000 Subject: [PATCH] R600/SI: Move hasSideEffects setting into VOPCX classes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232989 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/SIInstrInfo.td | 2 ++ lib/Target/R600/SIInstructions.td | 40 +++++++++++++------------------ 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/lib/Target/R600/SIInstrInfo.td b/lib/Target/R600/SIInstrInfo.td index 583fa5f7793..3288d33f1cf 100644 --- a/lib/Target/R600/SIInstrInfo.td +++ b/lib/Target/R600/SIInstrInfo.td @@ -1269,11 +1269,13 @@ multiclass VOPC_m pattern, def _si : VOPC, SIMCInstr { let Defs = !if(DefExec, [EXEC], []); + let hasSideEffects = DefExec; } def _vi : VOPC, SIMCInstr { let Defs = !if(DefExec, [EXEC], []); + let hasSideEffects = DefExec; } } diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td index 1afb89bb42a..7f4f8f2c0de 100644 --- a/lib/Target/R600/SIInstructions.td +++ b/lib/Target/R600/SIInstructions.td @@ -528,7 +528,7 @@ defm V_CMP_NLT_F32 : VOPC_F32 , "v_cmp_nlt_f32", COND_UGE>; defm V_CMP_TRU_F32 : VOPC_F32 , "v_cmp_tru_f32">; } // End isCommutable = 1 -let hasSideEffects = 1, isCommutable = 1 in { +let isCommutable = 1 in { defm V_CMPX_F_F32 : VOPCX_F32 , "v_cmpx_f_f32">; defm V_CMPX_LT_F32 : VOPCX_F32 , "v_cmpx_lt_f32", "v_cmpx_gt_f32">; @@ -547,7 +547,7 @@ defm V_CMPX_NEQ_F32 : VOPCX_F32 , "v_cmpx_neq_f32">; defm V_CMPX_NLT_F32 : VOPCX_F32 , "v_cmpx_nlt_f32">; defm V_CMPX_TRU_F32 : VOPCX_F32 , "v_cmpx_tru_f32">; -} // End hasSideEffects = 1, isCommutable = 1 +} // End isCommutable = 1 let isCommutable = 1 in { defm V_CMP_F_F64 : VOPC_F64 , "v_cmp_f_f64">; @@ -568,7 +568,7 @@ defm V_CMP_NLT_F64 : VOPC_F64 , "v_cmp_nlt_f64", COND_UGE>; defm V_CMP_TRU_F64 : VOPC_F64 , "v_cmp_tru_f64">; } // End isCommutable = 1 -let hasSideEffects = 1, isCommutable = 1 in { +let isCommutable = 1 in { defm V_CMPX_F_F64 : VOPCX_F64 , "v_cmpx_f_f64">; defm V_CMPX_LT_F64 : VOPCX_F64 , "v_cmpx_lt_f64", "v_cmpx_gt_f64">; @@ -587,7 +587,7 @@ defm V_CMPX_NEQ_F64 : VOPCX_F64 , "v_cmpx_neq_f64">; defm V_CMPX_NLT_F64 : VOPCX_F64 , "v_cmpx_nlt_f64">; defm V_CMPX_TRU_F64 : VOPCX_F64 , "v_cmpx_tru_f64">; -} // End hasSideEffects = 1, isCommutable = 1 +} // End isCommutable = 1 let SubtargetPredicate = isSICI in { @@ -610,7 +610,7 @@ defm V_CMPS_NLT_F32 : VOPC_F32 , "v_cmps_nlt_f32">; defm V_CMPS_TRU_F32 : VOPC_F32 , "v_cmps_tru_f32">; } // End isCommutable = 1 -let hasSideEffects = 1, isCommutable = 1 in { +let isCommutable = 1 in { defm V_CMPSX_F_F32 : VOPCX_F32 , "v_cmpsx_f_f32">; defm V_CMPSX_LT_F32 : VOPCX_F32 , "v_cmpsx_lt_f32", "v_cmpsx_gt_f32">; @@ -629,7 +629,7 @@ defm V_CMPSX_NEQ_F32 : VOPCX_F32 , "v_cmpsx_neq_f32">; defm V_CMPSX_NLT_F32 : VOPCX_F32 , "v_cmpsx_nlt_f32">; defm V_CMPSX_TRU_F32 : VOPCX_F32 , "v_cmpsx_tru_f32">; -} // End hasSideEffects = 1, isCommutable = 1 +} // End isCommutable = 1 let isCommutable = 1 in { defm V_CMPS_F_F64 : VOPC_F64 , "v_cmps_f_f64">; @@ -650,7 +650,7 @@ defm V_CMPS_NLT_F64 : VOPC_F64 , "v_cmps_nlt_f64">; defm V_CMPS_TRU_F64 : VOPC_F64 , "v_cmps_tru_f64">; } // End isCommutable = 1 -let hasSideEffects = 1, isCommutable = 1 in { +let isCommutable = 1 in { defm V_CMPSX_F_F64 : VOPCX_F64 , "v_cmpsx_f_f64">; defm V_CMPSX_LT_F64 : VOPCX_F64 , "v_cmpsx_lt_f64", "v_cmpsx_gt_f64">; @@ -669,7 +669,7 @@ defm V_CMPSX_NEQ_F64 : VOPCX_F64 , "v_cmpsx_neq_f64">; defm V_CMPSX_NLT_F64 : VOPCX_F64 , "v_cmpsx_nlt_f64">; defm V_CMPSX_TRU_F64 : VOPCX_F64 , "v_cmpsx_tru_f64">; -} // End hasSideEffects = 1, isCommutable = 1 +} // End isCommutable = 1 } // End SubtargetPredicate = isSICI @@ -684,7 +684,7 @@ defm V_CMP_GE_I32 : VOPC_I32 , "v_cmp_ge_i32", COND_SGE>; defm V_CMP_T_I32 : VOPC_I32 , "v_cmp_t_i32">; } // End isCommutable = 1 -let hasSideEffects = 1, isCommutable = 1 in { +let isCommutable = 1 in { defm V_CMPX_F_I32 : VOPCX_I32 , "v_cmpx_f_i32">; defm V_CMPX_LT_I32 : VOPCX_I32 , "v_cmpx_lt_i32", "v_cmpx_gt_i32">; @@ -695,7 +695,7 @@ defm V_CMPX_NE_I32 : VOPCX_I32 , "v_cmpx_ne_i32">; defm V_CMPX_GE_I32 : VOPCX_I32 , "v_cmpx_ge_i32">; defm V_CMPX_T_I32 : VOPCX_I32 , "v_cmpx_t_i32">; -} // End hasSideEffects = 1 +} // End isCommutable = 1 let isCommutable = 1 in { defm V_CMP_F_I64 : VOPC_I64 , "v_cmp_f_i64">; @@ -708,7 +708,7 @@ defm V_CMP_GE_I64 : VOPC_I64 , "v_cmp_ge_i64", COND_SGE>; defm V_CMP_T_I64 : VOPC_I64 , "v_cmp_t_i64">; } // End isCommutable = 1 -let hasSideEffects = 1, isCommutable = 1 in { +let isCommutable = 1 in { defm V_CMPX_F_I64 : VOPCX_I64 , "v_cmpx_f_i64">; defm V_CMPX_LT_I64 : VOPCX_I64 , "v_cmpx_lt_i64", "v_cmpx_gt_i64">; @@ -719,7 +719,7 @@ defm V_CMPX_NE_I64 : VOPCX_I64 , "v_cmpx_ne_i64">; defm V_CMPX_GE_I64 : VOPCX_I64 , "v_cmpx_ge_i64">; defm V_CMPX_T_I64 : VOPCX_I64 , "v_cmpx_t_i64">; -} // End hasSideEffects = 1, isCommutable = 1 +} // End isCommutable = 1 let isCommutable = 1 in { defm V_CMP_F_U32 : VOPC_I32 , "v_cmp_f_u32">; @@ -732,7 +732,7 @@ defm V_CMP_GE_U32 : VOPC_I32 , "v_cmp_ge_u32", COND_UGE>; defm V_CMP_T_U32 : VOPC_I32 , "v_cmp_t_u32">; } // End isCommutable = 1 -let hasSideEffects = 1, isCommutable = 1 in { +let isCommutable = 1 in { defm V_CMPX_F_U32 : VOPCX_I32 , "v_cmpx_f_u32">; defm V_CMPX_LT_U32 : VOPCX_I32 , "v_cmpx_lt_u32", "v_cmpx_gt_u32">; @@ -743,7 +743,7 @@ defm V_CMPX_NE_U32 : VOPCX_I32 , "v_cmpx_ne_u32">; defm V_CMPX_GE_U32 : VOPCX_I32 , "v_cmpx_ge_u32">; defm V_CMPX_T_U32 : VOPCX_I32 , "v_cmpx_t_u32">; -} // End hasSideEffects = 1, isCommutable = 1 +} // End isCommutable = 1 let isCommutable = 1 in { defm V_CMP_F_U64 : VOPC_I64 , "v_cmp_f_u64">; @@ -756,7 +756,7 @@ defm V_CMP_GE_U64 : VOPC_I64 , "v_cmp_ge_u64", COND_UGE>; defm V_CMP_T_U64 : VOPC_I64 , "v_cmp_t_u64">; } // End isCommutable = 1 -let hasSideEffects = 1, isCommutable = 1 in { +let isCommutable = 1 in { defm V_CMPX_F_U64 : VOPCX_I64 , "v_cmpx_f_u64">; defm V_CMPX_LT_U64 : VOPCX_I64 , "v_cmpx_lt_u64", "v_cmpx_gt_u64">; @@ -767,19 +767,13 @@ defm V_CMPX_NE_U64 : VOPCX_I64 , "v_cmpx_ne_u64">; defm V_CMPX_GE_U64 : VOPCX_I64 , "v_cmpx_ge_u64">; defm V_CMPX_T_U64 : VOPCX_I64 , "v_cmpx_t_u64">; -} // End hasSideEffects = 1, isCommutable = 1 +} // End isCommutable = 1 defm V_CMP_CLASS_F32 : VOPC_CLASS_F32 , "v_cmp_class_f32">; - -let hasSideEffects = 1 in { defm V_CMPX_CLASS_F32 : VOPCX_CLASS_F32 , "v_cmpx_class_f32">; -} // End hasSideEffects = 1 - defm V_CMP_CLASS_F64 : VOPC_CLASS_F64 , "v_cmp_class_f64">; - -let hasSideEffects = 1 in { defm V_CMPX_CLASS_F64 : VOPCX_CLASS_F64 , "v_cmpx_class_f64">; -} // End hasSideEffects = 1 + } // End isCompare = 1