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
This commit is contained in:
parent
c559f3ef4e
commit
ea298f7ad0
@ -1,3 +1,13 @@
|
||||
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>
|
||||
|
||||
* tree-ssa-alias.c (aliasing_component_refs_walk): Initialize same_p
|
||||
|
@ -1122,8 +1122,6 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
|
||||
rtx_insn *insn;
|
||||
rtx scratch, tmp0, tmp1, tmp2;
|
||||
rtx (*gen_divmod4_1) (rtx, rtx, rtx, rtx);
|
||||
rtx (*gen_zero_extend) (rtx, rtx);
|
||||
rtx (*gen_test_ccno_1) (rtx, rtx);
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
@ -1135,21 +1133,16 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
|
||||
else
|
||||
gen_divmod4_1
|
||||
= unsigned_p ? gen_udivmodsi4_zext_2 : gen_divmodsi4_zext_2;
|
||||
gen_zero_extend = gen_zero_extendqisi2;
|
||||
}
|
||||
else
|
||||
{
|
||||
gen_divmod4_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;
|
||||
gen_divmod4_1
|
||||
= unsigned_p ? gen_udivmodsi4_zext_1 : gen_divmodsi4_zext_1;
|
||||
break;
|
||||
|
||||
case E_DImode:
|
||||
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;
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
@ -1164,7 +1157,7 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
|
||||
emit_move_insn (scratch, operands[2]);
|
||||
scratch = expand_simple_binop (mode, IOR, scratch, operands[3],
|
||||
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_EQ (VOIDmode, tmp0, const0_rtx);
|
||||
tmp0 = gen_rtx_IF_THEN_ELSE (VOIDmode, tmp0,
|
||||
@ -1227,7 +1220,9 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
|
||||
|
||||
/* Zero extend quotient from AL. */
|
||||
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);
|
||||
|
||||
emit_label (end_label);
|
||||
|
@ -8124,7 +8124,7 @@
|
||||
;; On Pentium, "test imm, reg" is pairable only with eax, ax, and al.
|
||||
;; Note that this excludes ah.
|
||||
|
||||
(define_expand "test<mode>_ccno_1"
|
||||
(define_expand "@test<mode>_ccno_1"
|
||||
[(set (reg:CCNO FLAGS_REG)
|
||||
(compare:CCNO
|
||||
(and:SWI48
|
||||
@ -8142,19 +8142,15 @@
|
||||
[(set (reg FLAGS_REG)
|
||||
(compare
|
||||
(and:DI
|
||||
(match_operand:DI 0 "nonimmediate_operand" "%!*a,r,!*a,r,rm")
|
||||
(match_operand:DI 1 "x86_64_szext_nonmemory_operand" "Z,Z,e,e,re"))
|
||||
(match_operand:DI 0 "nonimmediate_operand" "r,rm")
|
||||
(match_operand:DI 1 "x86_64_szext_nonmemory_operand" "Z,re"))
|
||||
(const_int 0)))]
|
||||
"TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)"
|
||||
"@
|
||||
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}"
|
||||
[(set_attr "type" "test")
|
||||
(set_attr "modrm" "0,1,0,1,1")
|
||||
(set_attr "mode" "SI,SI,DI,DI,DI")])
|
||||
(set_attr "mode" "SI,DI")])
|
||||
|
||||
(define_insn "*testqi_1_maybe_si"
|
||||
[(set (reg FLAGS_REG)
|
||||
@ -8177,7 +8173,6 @@
|
||||
return "test{b}\t{%1, %0|%0, %1}";
|
||||
}
|
||||
[(set_attr "type" "test")
|
||||
(set_attr "modrm" "0,1,1,1")
|
||||
(set_attr "mode" "QI,QI,QI,SI")
|
||||
(set_attr "pent_pair" "uv,np,uv,np")])
|
||||
|
||||
@ -8191,7 +8186,6 @@
|
||||
"ix86_match_ccmode (insn, CCNOmode)"
|
||||
"test{<imodesuffix>}\t{%1, %0|%0, %1}"
|
||||
[(set_attr "type" "test")
|
||||
(set_attr "modrm" "0,1,1")
|
||||
(set_attr "mode" "<MODE>")
|
||||
(set_attr "pent_pair" "uv,np,uv")])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user