aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2016-12-29 22:41:07 +0100
committerUros Bizjak <uros@gcc.gnu.org>2016-12-29 22:41:07 +0100
commita455baa99483a4f5a1e667f35bf682e3f3071f53 (patch)
tree3429e240878ad3f1f8637215c6971fd52e431d4a /gcc/config
parent2ae2d394c1f9928fcb4bb7efdf9874edb787936a (diff)
downloadgcc-a455baa99483a4f5a1e667f35bf682e3f3071f53.zip
gcc-a455baa99483a4f5a1e667f35bf682e3f3071f53.tar.gz
gcc-a455baa99483a4f5a1e667f35bf682e3f3071f53.tar.bz2
re PR target/78904 (zero-extracts are not effective)
PR target/78904 * config/i386/i386.md (*extvqi): Remove insn pattern. (divmodqi4): Update expander to generate QImode zero-extract from AH. testsuite/ChangeLog: PR target/78904 * gcc.target/i386/pr78904-6.c: New test. From-SVN: r243968
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.md30
1 files changed, 2 insertions, 28 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index cf9dc03..0f0bf7a 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -2780,33 +2780,6 @@
[(set_attr "type" "imovx")
(set_attr "mode" "SI")])
-(define_insn "*extvqi"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=QBc,?R,m")
- (sign_extract:QI (match_operand 1 "ext_register_operand" "Q,Q,Q")
- (const_int 8)
- (const_int 8)))]
- ""
-{
- switch (get_attr_type (insn))
- {
- case TYPE_IMOVX:
- return "movs{bl|x}\t{%h1, %k0|%k0, %h1}";
- default:
- return "mov{b}\t{%h1, %0|%0, %h1}";
- }
-}
- [(set_attr "isa" "*,*,nox64")
- (set (attr "type")
- (if_then_else (and (match_operand:QI 0 "register_operand")
- (ior (not (match_operand:QI 0 "QIreg_operand"))
- (match_test "TARGET_MOVX")))
- (const_string "imovx")
- (const_string "imov")))
- (set (attr "mode")
- (if_then_else (eq_attr "type" "imovx")
- (const_string "SI")
- (const_string "QI")))])
-
(define_expand "extzv<mode>"
[(set (match_operand:SWI248 0 "register_operand")
(zero_extract:SWI248 (match_operand:SWI248 1 "register_operand")
@@ -7586,7 +7559,8 @@
emit_insn (gen_divmodhiqi3 (tmp0, tmp1, operands[2]));
/* Extract remainder from AH. */
- tmp1 = gen_rtx_SIGN_EXTRACT (QImode, tmp0, GEN_INT (8), GEN_INT (8));
+ tmp1 = gen_rtx_ZERO_EXTRACT (SImode, tmp0, GEN_INT (8), GEN_INT (8));
+ tmp1 = gen_rtx_SUBREG (QImode, tmp1, 0);
rtx_insn *insn = emit_move_insn (operands[3], tmp1);
mod = gen_rtx_MOD (QImode, operands[1], operands[2]);