Commit d55d2c84 by Uros Bizjak

i386.md (and<mode>3): Expand masking operations with 0xff...

	* config/i386/i386.md (and<mode>3): Expand masking operations with
	0xff, 0xffff or 0xffffffff immediates to corresponding zero_extend RTX.
	(and splitter): Split to DImode zero_extend RTX for DImode operand[0].

From-SVN: r186979
parent b9c8da34
2012-04-30 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (and<mode>3): Expand masking operations with
0xff, 0xffff or 0xffffffff immediates to corresponding zero_extend RTX.
(and splitter): Split to DImode zero_extend RTX for DImode operand[0].
2012-04-30 Dodji Seketeli <dodji@redhat.com> 2012-04-30 Dodji Seketeli <dodji@redhat.com>
Add -Wvarargs option Add -Wvarargs option
* builtins.c (fold_builtin_next_arg): Use OPT_Wvarargs as an * builtins.c (fold_builtin_next_arg): Use OPT_Wvarargs as an
argument for the various warning_at calls. argument for the various warning_at calls.
* docs/invoke.texi: Update the documentation. * docs/invoke.texi: Update the documentation.
2012-04-30 Dodji Seketeli <dodji@redhat.com> 2012-04-30 Dodji Seketeli <dodji@redhat.com>
...@@ -18,13 +24,11 @@ ...@@ -18,13 +24,11 @@
Make conversion warnings work on NULL with -ftrack-macro-expansion Make conversion warnings work on NULL with -ftrack-macro-expansion
* input.h (expansion_point_location_if_in_system_header): Declare * input.h (expansion_point_location_if_in_system_header): Declare
new function. new function.
* input.c (expansion_point_location_if_in_system_header): Define * input.c (expansion_point_location_if_in_system_header): Define it.
it.
Fix -Wuninitialized for -ftrack-macro-expansion Fix -Wuninitialized for -ftrack-macro-expansion
* tree-ssa.c (warn_uninit): Use the spelling location of the * tree-ssa.c (warn_uninit): Use the spelling location of the variable
variable declaration. Use linemap_location_before_p for source declaration. Use linemap_location_before_p for source locations.
locations.
Strip "<built-in>" loc from displayed expansion context Strip "<built-in>" loc from displayed expansion context
* input.c (expand_location_1): When expanding to spelling location * input.c (expand_location_1): When expanding to spelling location
...@@ -61,8 +65,9 @@ ...@@ -61,8 +65,9 @@
2012-04-29 Manuel López-Ibáñez <manu@gcc.gnu.org> 2012-04-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
* opts.c (finish_options): Do not handle -Wmissing-noreturn here. * opts.c (finish_options): Do not handle -Wmissing-noreturn here.
* common.opt (Wmissing-noreturn): Alias of -Wsuggest-attribute=noreturn. * common.opt (Wmissing-noreturn): Alias of
-Wsuggest-attribute=noreturn.
2012-04-29 Hans-Peter Nilsson <hp@axis.com> 2012-04-29 Hans-Peter Nilsson <hp@axis.com>
...@@ -102,9 +107,8 @@ ...@@ -102,9 +107,8 @@
2012-04-27 Paolo Bonzini <bonzini@gnu.org> 2012-04-27 Paolo Bonzini <bonzini@gnu.org>
* tree-ssa-phiopt.c (conditional_replacement): Replace PHIs * tree-ssa-phiopt.c (conditional_replacement): Replace PHIs whose
whose arguments are -1 and 0, by negating the result of the arguments are -1 and 0, by negating the result of the conditional.
conditional.
2012-04-27 Paolo Bonzini <bonzini@gnu.org> 2012-04-27 Paolo Bonzini <bonzini@gnu.org>
...@@ -289,8 +293,7 @@ ...@@ -289,8 +293,7 @@
* config/sparc/sparc.md (attr type): Delete 'fgm_cmp'. * config/sparc/sparc.md (attr type): Delete 'fgm_cmp'.
(fpack16_vis, fpackfix_vis, fpack32_vis): Set type to fgm_pack. (fpack16_vis, fpackfix_vis, fpack32_vis): Set type to fgm_pack.
(fmul8x16_vis, fmul8x16au_vis, fmul8x16al_vis, fmul8sux16_vis, (fmul8x16_vis, fmul8x16au_vis, fmul8x16al_vis, fmul8sux16_vis,
fmul8ulx16_vis, fmuld8sux16_vis, fmuld8ulx16_vis): Set type to fmul8ulx16_vis, fmuld8sux16_vis, fmuld8ulx16_vis): Set type to fgm_mul.
fgm_mul.
(alignaddrsi_vis, alignaddrdi_vis, alignaddrlsi_vis, (alignaddrsi_vis, alignaddrdi_vis, alignaddrlsi_vis,
alignaddrldi_vis): Set type to gsr. alignaddrldi_vis): Set type to gsr.
(pdist_vis, pdistn<mode>_vis): Set type to fgm_pdsit. (pdist_vis, pdistn<mode>_vis): Set type to fgm_pdsit.
...@@ -348,8 +351,7 @@ ...@@ -348,8 +351,7 @@
2012-04-25 H.J. Lu <hongjiu.lu@intel.com> 2012-04-25 H.J. Lu <hongjiu.lu@intel.com>
PR debug/52857 PR debug/52857
* dwarf2out.c (dbx_reg_number): Assert return value != * dwarf2out.c (dbx_reg_number): Assert return value != INVALID_REGNUM.
INVALID_REGNUM.
2012-04-25 Jakub Jelinek <jakub@redhat.com> 2012-04-25 Jakub Jelinek <jakub@redhat.com>
...@@ -404,8 +406,9 @@ ...@@ -404,8 +406,9 @@
2012-04-25 Jan Hubicka <jh@suse.cz> 2012-04-25 Jan Hubicka <jh@suse.cz>
PR middle-end/53089 PR middle-end/53089
* cgraphunit.c (referred_to_p): Move ahead in file to avoid forward declaration. * cgraphunit.c (referred_to_p): Move ahead in file to avoid
forward declaration.
(cgraph_finalize_function): Finalize them here. (cgraph_finalize_function): Finalize them here.
* symtab.c (dump_symtab): Dump ctors and dtors. * symtab.c (dump_symtab): Dump ctors and dtors.
...@@ -417,8 +420,7 @@ ...@@ -417,8 +420,7 @@
Also check that unit bytes long store at bitpos / unit * unit Also check that unit bytes long store at bitpos / unit * unit
doesn't affect bits beyond bitregion_end. doesn't affect bits beyond bitregion_end.
* expmed.c (store_bit_field_1): Avoid trying insv if OP_MODE MEM * expmed.c (store_bit_field_1): Avoid trying insv if OP_MODE MEM
would not fit into bitregion_start ... bitregion_end + 1 bit would not fit into bitregion_start ... bitregion_end + 1 bit region.
region.
(store_split_bit_field): Decrease unit close to end of bitregion_end (store_split_bit_field): Decrease unit close to end of bitregion_end
if access is restricted in order to avoid mutual recursion. if access is restricted in order to avoid mutual recursion.
...@@ -427,9 +429,8 @@ ...@@ -427,9 +429,8 @@
prototypes. prototypes.
* double-int.c (double_int_max_value, double_int_min_value): New * double-int.c (double_int_max_value, double_int_min_value): New
functions. functions.
* tree-vrp.c (register_edge_assert_for_2): Compare mask * tree-vrp.c (register_edge_assert_for_2): Compare mask for LE_EXPR
for LE_EXPR or GT_EXPR with double_int_max_value or GT_EXPR with double_int_max_value instead of double_int_mask.
instead of double_int_mask.
2012-04-25 Richard Guenther <rguenther@suse.de> 2012-04-25 Richard Guenther <rguenther@suse.de>
...@@ -437,8 +438,7 @@ ...@@ -437,8 +438,7 @@
* tree-vect-loop.c (vect_transform_loop): Adjust. * tree-vect-loop.c (vect_transform_loop): Adjust.
* tree-vect-loop-manip.c (vect_do_peeling_for_loop_bound): Record * tree-vect-loop-manip.c (vect_do_peeling_for_loop_bound): Record
the maximum number of iterations for the epilogue loop. the maximum number of iterations for the epilogue loop.
(vect_loop_versioning): Remove case re-using the peeled (vect_loop_versioning): Remove case re-using the peeled epilogue loop.
epilogue loop.
2012-04-25 Jakub Jelinek <jakub@redhat.com> 2012-04-25 Jakub Jelinek <jakub@redhat.com>
......
...@@ -7695,14 +7695,45 @@ ...@@ -7695,14 +7695,45 @@
(match_operand:SWIM 2 "<general_szext_operand>")))] (match_operand:SWIM 2 "<general_szext_operand>")))]
"" ""
{ {
if (<MODE>mode == DImode enum machine_mode mode = GET_MODE (operands[1]);
&& GET_CODE (operands[2]) == CONST_INT rtx (*insn) (rtx, rtx);
&& INTVAL (operands[2]) == (HOST_WIDE_INT) 0xffffffff
&& REG_P (operands[1])) if (CONST_INT_P (operands[2]) && REG_P (operands[0]))
emit_insn (gen_zero_extendsidi2 (operands[0], {
gen_lowpart (SImode, operands[1]))); HOST_WIDE_INT ival = INTVAL (operands[2]);
if (ival == (HOST_WIDE_INT) 0xffffffff)
mode = SImode;
else if (ival == 0xffff)
mode = HImode;
else if (ival == 0xff)
mode = QImode;
}
if (mode == GET_MODE (operands[1]))
{
ix86_expand_binary_operator (AND, <MODE>mode, operands);
DONE;
}
operands[1] = gen_lowpart (mode, operands[1]);
if (GET_MODE (operands[0]) == DImode)
insn = (mode == SImode)
? gen_zero_extendsidi2
: (mode == HImode)
? gen_zero_extendhidi2
: gen_zero_extendqidi2;
else if (GET_MODE (operands[0]) == SImode)
insn = (mode == HImode)
? gen_zero_extendhisi2
: gen_zero_extendqisi2;
else if (GET_MODE (operands[0]) == HImode)
insn = gen_zero_extendqihi2;
else else
ix86_expand_binary_operator (AND, <MODE>mode, operands); gcc_unreachable ();
emit_insn (insn (operands[0], operands[1]));
DONE; DONE;
}) })
...@@ -7839,32 +7870,38 @@ ...@@ -7839,32 +7870,38 @@
&& true_regnum (operands[0]) != true_regnum (operands[1])" && true_regnum (operands[0]) != true_regnum (operands[1])"
[(const_int 0)] [(const_int 0)]
{ {
HOST_WIDE_INT ival = INTVAL (operands[2]);
enum machine_mode mode; enum machine_mode mode;
rtx (*insn) (rtx, rtx);
if (INTVAL (operands[2]) == (HOST_WIDE_INT) 0xffffffff) if (ival == (HOST_WIDE_INT) 0xffffffff)
mode = SImode; mode = SImode;
else if (INTVAL (operands[2]) == 0xffff) else if (ival == 0xffff)
mode = HImode; mode = HImode;
else else
{ {
gcc_assert (INTVAL (operands[2]) == 0xff); gcc_assert (ival == 0xff);
mode = QImode; mode = QImode;
} }
operands[1] = gen_lowpart (mode, operands[1]); operands[1] = gen_lowpart (mode, operands[1]);
if (mode == SImode) if (GET_MODE (operands[0]) == DImode)
emit_insn (gen_zero_extendsidi2 (operands[0], operands[1])); insn = (mode == SImode)
? gen_zero_extendsidi2
: (mode == HImode)
? gen_zero_extendhidi2
: gen_zero_extendqidi2;
else else
{ {
rtx (*insn) (rtx, rtx);
/* Zero extend to SImode to avoid partial register stalls. */ /* Zero extend to SImode to avoid partial register stalls. */
operands[0] = gen_lowpart (SImode, operands[0]); operands[0] = gen_lowpart (SImode, operands[0]);
insn = (mode == HImode) ? gen_zero_extendhisi2 : gen_zero_extendqisi2; insn = (mode == HImode)
emit_insn (insn (operands[0], operands[1])); ? gen_zero_extendhisi2
: gen_zero_extendqisi2;
} }
emit_insn (insn (operands[0], operands[1]));
DONE; DONE;
}) })
......
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