Commit ea298f7a by Uros Bizjak Committed by Uros Bizjak

i386.md (@test<mode>_ccno_1): Rename from test<mode>_ccno_1.

	* config/i386/i386.md (@test<mode>_ccno_1):
	Rename from test<mode>_ccno_1.
	(*testdi_1): Remove redundant alternatives.  Remove modrm attribute.
	(*testqi_1_maybe_si): Remove modrm attribute.
	(*test<mode>_1): Ditto.
	* config/i386/i386-expand.c (ix86_split_idivmod): Use
	gen_test_ccno_1 and gen_extend_insn.

From-SVN: r273496
parent c559f3ef
2019-07-15 Uroš Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (@test<mode>_ccno_1):
Rename from test<mode>_ccno_1.
(*testdi_1): Remove redundant alternatives. Remove modrm attribute.
(*testqi_1_maybe_si): Remove modrm attribute.
(*test<mode>_1): Ditto.
* config/i386/i386-expand.c (ix86_split_idivmod): Use
gen_test_ccno_1 and gen_extend_insn.
2019-07-15 Jan Hubicka <hubicka@ucw.cz> 2019-07-15 Jan Hubicka <hubicka@ucw.cz>
* tree-ssa-alias.c (aliasing_component_refs_walk): Initialize same_p * tree-ssa-alias.c (aliasing_component_refs_walk): Initialize same_p
......
...@@ -1122,8 +1122,6 @@ ix86_split_idivmod (machine_mode mode, rtx operands[], ...@@ -1122,8 +1122,6 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
rtx_insn *insn; rtx_insn *insn;
rtx scratch, tmp0, tmp1, tmp2; rtx scratch, tmp0, tmp1, tmp2;
rtx (*gen_divmod4_1) (rtx, rtx, rtx, rtx); rtx (*gen_divmod4_1) (rtx, rtx, rtx, rtx);
rtx (*gen_zero_extend) (rtx, rtx);
rtx (*gen_test_ccno_1) (rtx, rtx);
switch (mode) switch (mode)
{ {
...@@ -1135,21 +1133,16 @@ ix86_split_idivmod (machine_mode mode, rtx operands[], ...@@ -1135,21 +1133,16 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
else else
gen_divmod4_1 gen_divmod4_1
= unsigned_p ? gen_udivmodsi4_zext_2 : gen_divmodsi4_zext_2; = unsigned_p ? gen_udivmodsi4_zext_2 : gen_divmodsi4_zext_2;
gen_zero_extend = gen_zero_extendqisi2;
} }
else else
{ gen_divmod4_1
gen_divmod4_1 = unsigned_p ? gen_udivmodsi4_zext_1 : gen_divmodsi4_zext_1;
= unsigned_p ? gen_udivmodsi4_zext_1 : gen_divmodsi4_zext_1;
gen_zero_extend = gen_zero_extendqidi2;
}
gen_test_ccno_1 = gen_testsi_ccno_1;
break; break;
case E_DImode: case E_DImode:
gen_divmod4_1 = unsigned_p ? gen_udivmoddi4_1 : gen_divmoddi4_1; gen_divmod4_1 = unsigned_p ? gen_udivmoddi4_1 : gen_divmoddi4_1;
gen_test_ccno_1 = gen_testdi_ccno_1;
gen_zero_extend = gen_zero_extendqidi2;
break; break;
default: default:
gcc_unreachable (); gcc_unreachable ();
} }
...@@ -1164,7 +1157,7 @@ ix86_split_idivmod (machine_mode mode, rtx operands[], ...@@ -1164,7 +1157,7 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
emit_move_insn (scratch, operands[2]); emit_move_insn (scratch, operands[2]);
scratch = expand_simple_binop (mode, IOR, scratch, operands[3], scratch = expand_simple_binop (mode, IOR, scratch, operands[3],
scratch, 1, OPTAB_DIRECT); scratch, 1, OPTAB_DIRECT);
emit_insn (gen_test_ccno_1 (scratch, GEN_INT (-0x100))); emit_insn (gen_test_ccno_1 (mode, scratch, GEN_INT (-0x100)));
tmp0 = gen_rtx_REG (CCNOmode, FLAGS_REG); tmp0 = gen_rtx_REG (CCNOmode, FLAGS_REG);
tmp0 = gen_rtx_EQ (VOIDmode, tmp0, const0_rtx); tmp0 = gen_rtx_EQ (VOIDmode, tmp0, const0_rtx);
tmp0 = gen_rtx_IF_THEN_ELSE (VOIDmode, tmp0, tmp0 = gen_rtx_IF_THEN_ELSE (VOIDmode, tmp0,
...@@ -1227,7 +1220,9 @@ ix86_split_idivmod (machine_mode mode, rtx operands[], ...@@ -1227,7 +1220,9 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
/* Zero extend quotient from AL. */ /* Zero extend quotient from AL. */
tmp1 = gen_lowpart (QImode, tmp0); tmp1 = gen_lowpart (QImode, tmp0);
insn = emit_insn (gen_zero_extend (operands[0], tmp1)); insn = emit_insn (gen_extend_insn
(operands[0], tmp1,
GET_MODE (operands[0]), QImode, 1));
set_unique_reg_note (insn, REG_EQUAL, div); set_unique_reg_note (insn, REG_EQUAL, div);
emit_label (end_label); emit_label (end_label);
......
...@@ -8124,7 +8124,7 @@ ...@@ -8124,7 +8124,7 @@
;; On Pentium, "test imm, reg" is pairable only with eax, ax, and al. ;; On Pentium, "test imm, reg" is pairable only with eax, ax, and al.
;; Note that this excludes ah. ;; Note that this excludes ah.
(define_expand "test<mode>_ccno_1" (define_expand "@test<mode>_ccno_1"
[(set (reg:CCNO FLAGS_REG) [(set (reg:CCNO FLAGS_REG)
(compare:CCNO (compare:CCNO
(and:SWI48 (and:SWI48
...@@ -8142,19 +8142,15 @@ ...@@ -8142,19 +8142,15 @@
[(set (reg FLAGS_REG) [(set (reg FLAGS_REG)
(compare (compare
(and:DI (and:DI
(match_operand:DI 0 "nonimmediate_operand" "%!*a,r,!*a,r,rm") (match_operand:DI 0 "nonimmediate_operand" "r,rm")
(match_operand:DI 1 "x86_64_szext_nonmemory_operand" "Z,Z,e,e,re")) (match_operand:DI 1 "x86_64_szext_nonmemory_operand" "Z,re"))
(const_int 0)))] (const_int 0)))]
"TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)" "TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)"
"@ "@
test{l}\t{%k1, %k0|%k0, %k1} test{l}\t{%k1, %k0|%k0, %k1}
test{l}\t{%k1, %k0|%k0, %k1}
test{q}\t{%1, %0|%0, %1}
test{q}\t{%1, %0|%0, %1}
test{q}\t{%1, %0|%0, %1}" test{q}\t{%1, %0|%0, %1}"
[(set_attr "type" "test") [(set_attr "type" "test")
(set_attr "modrm" "0,1,0,1,1") (set_attr "mode" "SI,DI")])
(set_attr "mode" "SI,SI,DI,DI,DI")])
(define_insn "*testqi_1_maybe_si" (define_insn "*testqi_1_maybe_si"
[(set (reg FLAGS_REG) [(set (reg FLAGS_REG)
...@@ -8177,7 +8173,6 @@ ...@@ -8177,7 +8173,6 @@
return "test{b}\t{%1, %0|%0, %1}"; return "test{b}\t{%1, %0|%0, %1}";
} }
[(set_attr "type" "test") [(set_attr "type" "test")
(set_attr "modrm" "0,1,1,1")
(set_attr "mode" "QI,QI,QI,SI") (set_attr "mode" "QI,QI,QI,SI")
(set_attr "pent_pair" "uv,np,uv,np")]) (set_attr "pent_pair" "uv,np,uv,np")])
...@@ -8191,7 +8186,6 @@ ...@@ -8191,7 +8186,6 @@
"ix86_match_ccmode (insn, CCNOmode)" "ix86_match_ccmode (insn, CCNOmode)"
"test{<imodesuffix>}\t{%1, %0|%0, %1}" "test{<imodesuffix>}\t{%1, %0|%0, %1}"
[(set_attr "type" "test") [(set_attr "type" "test")
(set_attr "modrm" "0,1,1")
(set_attr "mode" "<MODE>") (set_attr "mode" "<MODE>")
(set_attr "pent_pair" "uv,np,uv")]) (set_attr "pent_pair" "uv,np,uv")])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment