|
9036 | 9036 | (match_operand:SWI48 1 "nonimmediate_operand" "%0,0,rm,r")) |
9037 | 9037 | (match_operand:SWI48 2 "nonimmediate_operand" "r,rm,r,m"))) |
9038 | 9038 | (plus:<DWI> |
9039 | | - (zero_extend:<DWI> (match_dup 2)) |
9040 | 9039 | (match_operator:<DWI> 4 "ix86_carry_flag_operator" |
9041 | | - [(match_dup 3) (const_int 0)])))) |
| 9040 | + [(match_dup 3) (const_int 0)]) |
| 9041 | + (zero_extend:<DWI> (match_dup 2))))) |
9042 | 9042 | (set (match_operand:SWI48 0 "nonimmediate_operand" "=rm,r,r,r") |
9043 | 9043 | (plus:SWI48 (plus:SWI48 (match_op_dup 5 |
9044 | | - [(match_dup 3) (const_int 0)]) |
| 9044 | + [(match_dup 3) (const_int 0)]) |
9045 | 9045 | (match_dup 1)) |
9046 | 9046 | (match_dup 2)))] |
9047 | 9047 | "ix86_binary_operator_ok (PLUS, <MODE>mode, operands, TARGET_APX_NDD)" |
|
9068 | 9068 | (match_operand:SWI48 0 "general_reg_operand")) |
9069 | 9069 | (match_operand:SWI48 1 "memory_operand"))) |
9070 | 9070 | (plus:<DWI> |
9071 | | - (zero_extend:<DWI> (match_dup 1)) |
9072 | 9071 | (match_operator:<DWI> 3 "ix86_carry_flag_operator" |
9073 | | - [(match_dup 2) (const_int 0)])))) |
| 9072 | + [(match_dup 2) (const_int 0)]) |
| 9073 | + (zero_extend:<DWI> (match_dup 1))))) |
9074 | 9074 | (set (match_dup 0) |
9075 | 9075 | (plus:SWI48 (plus:SWI48 (match_op_dup 4 |
9076 | 9076 | [(match_dup 2) (const_int 0)]) |
|
9090 | 9090 | (match_dup 1)) |
9091 | 9091 | (match_dup 0))) |
9092 | 9092 | (plus:<DWI> |
9093 | | - (zero_extend:<DWI> (match_dup 0)) |
9094 | 9093 | (match_op_dup 3 |
9095 | | - [(match_dup 2) (const_int 0)])))) |
| 9094 | + [(match_dup 2) (const_int 0)]) |
| 9095 | + (zero_extend:<DWI> (match_dup 0))))) |
9096 | 9096 | (set (match_dup 1) |
9097 | 9097 | (plus:SWI48 (plus:SWI48 (match_op_dup 4 |
9098 | 9098 | [(match_dup 2) (const_int 0)]) |
|
9113 | 9113 | (match_dup 0)) |
9114 | 9114 | (match_operand:SWI48 2 "memory_operand"))) |
9115 | 9115 | (plus:<DWI> |
9116 | | - (zero_extend:<DWI> (match_dup 2)) |
9117 | 9116 | (match_operator:<DWI> 4 "ix86_carry_flag_operator" |
9118 | | - [(match_dup 3) (const_int 0)])))) |
| 9117 | + [(match_dup 3) (const_int 0)]) |
| 9118 | + (zero_extend:<DWI> (match_dup 2))))) |
9119 | 9119 | (set (match_dup 0) |
9120 | 9120 | (plus:SWI48 (plus:SWI48 (match_op_dup 5 |
9121 | 9121 | [(match_dup 3) (const_int 0)]) |
|
9137 | 9137 | (match_dup 1)) |
9138 | 9138 | (match_dup 0))) |
9139 | 9139 | (plus:<DWI> |
9140 | | - (zero_extend:<DWI> (match_dup 0)) |
9141 | 9140 | (match_op_dup 4 |
9142 | | - [(match_dup 3) (const_int 0)])))) |
| 9141 | + [(match_dup 3) (const_int 0)]) |
| 9142 | + (zero_extend:<DWI> (match_dup 0))))) |
9143 | 9143 | (set (match_dup 1) |
9144 | 9144 | (plus:SWI48 (plus:SWI48 (match_op_dup 5 |
9145 | 9145 | [(match_dup 3) (const_int 0)]) |
|
9158 | 9158 | (match_operand:SWI48 0 "general_reg_operand")) |
9159 | 9159 | (match_operand:SWI48 1 "memory_operand"))) |
9160 | 9160 | (plus:<DWI> |
9161 | | - (zero_extend:<DWI> (match_dup 1)) |
9162 | 9161 | (match_operator:<DWI> 3 "ix86_carry_flag_operator" |
9163 | | - [(match_dup 2) (const_int 0)])))) |
| 9162 | + [(match_dup 2) (const_int 0)]) |
| 9163 | + (zero_extend:<DWI> (match_dup 1))))) |
9164 | 9164 | (set (match_dup 0) |
9165 | 9165 | (plus:SWI48 (plus:SWI48 (match_op_dup 4 |
9166 | 9166 | [(match_dup 2) (const_int 0)]) |
|
9188 | 9188 | (match_dup 1)) |
9189 | 9189 | (match_dup 0))) |
9190 | 9190 | (plus:<DWI> |
9191 | | - (zero_extend:<DWI> (match_dup 0)) |
9192 | 9191 | (match_op_dup 3 |
9193 | | - [(match_dup 2) (const_int 0)])))) |
| 9192 | + [(match_dup 2) (const_int 0)]) |
| 9193 | + (zero_extend:<DWI> (match_dup 0))))) |
9194 | 9194 | (set (match_dup 1) |
9195 | 9195 | (plus:SWI48 (plus:SWI48 (match_op_dup 4 |
9196 | 9196 | [(match_dup 2) (const_int 0)]) |
|
9222 | 9222 | (match_operand:SWI48 1 "nonimmediate_operand" "%0,rm")) |
9223 | 9223 | (match_operand:SWI48 2 "x86_64_immediate_operand" "e,e"))) |
9224 | 9224 | (plus:<DWI> |
9225 | | - (match_operand:<DWI> 6 "const_scalar_int_operand") |
9226 | 9225 | (match_operator:<DWI> 4 "ix86_carry_flag_operator" |
9227 | | - [(match_dup 3) (const_int 0)])))) |
| 9226 | + [(match_dup 3) (const_int 0)]) |
| 9227 | + (match_operand:<DWI> 6 "const_scalar_int_operand")))) |
9228 | 9228 | (set (match_operand:SWI48 0 "nonimmediate_operand" "=rm,r") |
9229 | 9229 | (plus:SWI48 (plus:SWI48 (match_op_dup 5 |
9230 | 9230 | [(match_dup 3) (const_int 0)]) |
|
9748 | 9748 | (minus:SWI48 (match_dup 1) (match_dup 2)))])] |
9749 | 9749 | "ix86_binary_operator_ok (MINUS, <MODE>mode, operands, TARGET_APX_NDD)") |
9750 | 9750 |
|
| 9751 | +(define_insn "*subborrow<mode>_1" |
| 9752 | + [(set (reg:CCC FLAGS_REG) |
| 9753 | + (compare:CCC |
| 9754 | + (zero_extend:<DWI> |
| 9755 | + (match_operand:SWI48 1 "nonimmediate_operand" "0,rm")) |
| 9756 | + (plus:<DWI> |
| 9757 | + (match_operator:<DWI> 4 "ix86_carry_flag_operator" |
| 9758 | + [(match_operand 3 "flags_reg_operand") (const_int 0)]) |
| 9759 | + (match_operand:<DWI> 6 "const_scalar_int_operand")))) |
| 9760 | + (set (match_operand:SWI48 0 "nonimmediate_operand" "=rm,r") |
| 9761 | + (plus:SWI48 (minus:SWI48 |
| 9762 | + (match_dup 1) |
| 9763 | + (match_operator:SWI48 5 "ix86_carry_flag_operator" |
| 9764 | + [(match_dup 3) (const_int 0)])) |
| 9765 | + (match_operand:SWI48 2 "x86_64_immediate_operand" "e,e")))] |
| 9766 | + "ix86_binary_operator_ok (MINUS, <MODE>mode, operands, TARGET_APX_NDD) |
| 9767 | + && CONST_INT_P (operands[2]) |
| 9768 | + /* Check that operands[6] is -operands[2] zero extended from |
| 9769 | + <MODE>mode to <DWI>mode. */ |
| 9770 | + && ((<MODE>mode == SImode || -INTVAL (operands[2]) >= 0) |
| 9771 | + ? (CONST_INT_P (operands[6]) |
| 9772 | + && (UINTVAL (operands[6]) |
| 9773 | + == ((unsigned HOST_WIDE_INT) -INTVAL (operands[2]) |
| 9774 | + & GET_MODE_MASK (<MODE>mode)))) |
| 9775 | + : (CONST_WIDE_INT_P (operands[6]) |
| 9776 | + && CONST_WIDE_INT_NUNITS (operands[6]) == 2 |
| 9777 | + && ((unsigned HOST_WIDE_INT) CONST_WIDE_INT_ELT (operands[6], 0) |
| 9778 | + == (unsigned HOST_WIDE_INT) -INTVAL (operands[2])) |
| 9779 | + && CONST_WIDE_INT_ELT (operands[6], 1) == 0))" |
| 9780 | +{ |
| 9781 | + bool use_ndd = get_attr_isa (insn) == ISA_APX_NDD; |
| 9782 | + |
| 9783 | + operands[2] = GEN_INT (-INTVAL (operands[2])); |
| 9784 | + |
| 9785 | + return use_ndd ? "sbb{<imodesuffix>}\t{%2, %1, %0|%0, %1, %2}" |
| 9786 | + : "sbb{<imodesuffix>}\t{%2, %0|%0, %2}"; |
| 9787 | +} |
| 9788 | + [(set_attr "isa" "*,apx_ndd") |
| 9789 | + (set_attr "type" "alu") |
| 9790 | + (set_attr "use_carry" "1") |
| 9791 | + (set_attr "pent_pair" "pu") |
| 9792 | + (set_attr "mode" "<MODE>") |
| 9793 | + (set (attr "length_immediate") |
| 9794 | + (if_then_else (match_test "IN_RANGE (-INTVAL (operands[2]), -128, 127)") |
| 9795 | + (const_string "1") |
| 9796 | + (const_string "4")))]) |
| 9797 | + |
9751 | 9798 | (define_expand "uaddc<mode>5" |
9752 | 9799 | [(match_operand:SWI48 0 "register_operand") |
9753 | 9800 | (match_operand:SWI48 1 "register_operand") |
|
10040 | 10087 | (match_dup 4)) |
10041 | 10088 | (match_dup 5))) |
10042 | 10089 | (plus:<DWI> |
10043 | | - (match_dup 6) |
10044 | | - (ltu:<DWI> (reg:CC FLAGS_REG) (const_int 0))))) |
| 10090 | + (ltu:<DWI> (reg:CC FLAGS_REG) (const_int 0)) |
| 10091 | + (match_dup 6)))) |
10045 | 10092 | (set (match_dup 3) |
10046 | 10093 | (plus:DWIH |
10047 | 10094 | (plus:DWIH (ltu:DWIH (reg:CC FLAGS_REG) (const_int 0)) |
|
0 commit comments