From df65c84d18307823b0092f07160f0e638d99026d Mon Sep 17 00:00:00 2001 From: uros Date: Mon, 30 Apr 2012 17:12:42 +0000 Subject: [PATCH] * config/i386/i386.md (and3): Change runtime operand mode checks to compile-time "mode == mode" checks. (and splitter): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186993 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 +++++++- gcc/config/i386/i386.md | 25 +++++++++++-------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea032c1..5e7dadf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-04-30 Uros Bizjak + + * config/i386/i386.md (and3): Change runtime operand mode checks + to compile-time "mode == mode" checks. + (and splitter): Ditto. + 2012-04-30 Richard Henderson * config/arm/arm.md (UNSPEC_LL): New. @@ -40,7 +46,7 @@ * config/arm/arm-protos.h (ldm_stm_operation_p): New parameters. * config/arm/arm.c (ldm_stm_operation_p): New parameters. * config/arm/predicates.md (load_multiple_operation): Add arguments. - (store_multiple_operation): Likewise. + (store_multiple_operation): Likewise. 2012-04-30 Uros Bizjak diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index c98efaa..9047a31 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -7695,7 +7695,7 @@ (match_operand:SWIM 2 "")))] "" { - enum machine_mode mode = GET_MODE (operands[1]); + enum machine_mode mode = mode; rtx (*insn) (rtx, rtx); if (CONST_INT_P (operands[2]) && REG_P (operands[0])) @@ -7710,30 +7710,28 @@ mode = QImode; } - if (mode == GET_MODE (operands[1])) + if (mode == mode) { ix86_expand_binary_operator (AND, mode, operands); DONE; } - operands[1] = gen_lowpart (mode, operands[1]); - - if (GET_MODE (operands[0]) == DImode) + if (mode == DImode) insn = (mode == SImode) ? gen_zero_extendsidi2 : (mode == HImode) ? gen_zero_extendhidi2 : gen_zero_extendqidi2; - else if (GET_MODE (operands[0]) == SImode) + else if (mode == SImode) insn = (mode == HImode) ? gen_zero_extendhisi2 : gen_zero_extendqisi2; - else if (GET_MODE (operands[0]) == HImode) + else if (mode == HImode) insn = gen_zero_extendqihi2; else gcc_unreachable (); - emit_insn (insn (operands[0], operands[1])); + emit_insn (insn (operands[0], gen_lowpart (mode, operands[1]))); DONE; }) @@ -7884,9 +7882,7 @@ mode = QImode; } - operands[1] = gen_lowpart (mode, operands[1]); - - if (GET_MODE (operands[0]) == DImode) + if (mode == DImode) insn = (mode == SImode) ? gen_zero_extendsidi2 : (mode == HImode) @@ -7894,14 +7890,15 @@ : gen_zero_extendqidi2; else { - /* Zero extend to SImode to avoid partial register stalls. */ - operands[0] = gen_lowpart (SImode, operands[0]); + if (mode != SImode) + /* Zero extend to SImode to avoid partial register stalls. */ + operands[0] = gen_lowpart (SImode, operands[0]); insn = (mode == HImode) ? gen_zero_extendhisi2 : gen_zero_extendqisi2; } - emit_insn (insn (operands[0], operands[1])); + emit_insn (insn (operands[0], gen_lowpart (mode, operands[1]))); DONE; }) -- 2.7.4