i386.md (HI/SImode test with imm to QImode splitters): Use gen_int_mode instead of...
authorUros Bizjak <ubizjak@gmail.com>
Wed, 4 Jan 2017 15:42:36 +0000 (16:42 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 4 Jan 2017 15:42:36 +0000 (16:42 +0100)
* config/i386/i386.md (HI/SImode test with imm to QImode splitters):
Use gen_int_mode instead of gen_lopwart for const_int operands.

From-SVN: r244058

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/config/i386/sse.md

index 864c30b9ccd2c05b004ca1099eb85fff24c3df97..d43c9bcc5a0935f2b9fda2e0f4dc98b5facc895a 100644 (file)
@@ -1,3 +1,8 @@
+2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
+       Use gen_int_mode instead of gen_lopwart for const_int operands.
+
 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/71563
index c947955b9aa3631999f135ac3c97ae62e620f7ad..807dc6559f5484325aa6630d6129deb7b929dc36 100644 (file)
                         (const_int 0)]))]
 {
   operands[2] = gen_lowpart (QImode, operands[2]);
-  operands[3] = gen_lowpart (QImode, operands[3]);
+  operands[3] = gen_int_mode (INTVAL (operands[3]), QImode);
 })
 
 ;; %%% This used to optimize known byte-wide and operations to memory,
 {
   operands[0] = gen_lowpart (QImode, operands[0]);
   operands[1] = gen_lowpart (QImode, operands[1]);
-  operands[2] = gen_lowpart (QImode, operands[2]);
+  operands[2] = gen_int_mode (INTVAL (operands[2]), QImode);
 })
 
 (define_insn "*andndi3_doubleword"
 {
   operands[0] = gen_lowpart (QImode, operands[0]);
   operands[1] = gen_lowpart (QImode, operands[1]);
-  operands[2] = gen_lowpart (QImode, operands[2]);
+  operands[2] = gen_int_mode (INTVAL (operands[2]), QImode);
 })
 
 (define_expand "xorqi_ext_1_cc"
index 123fe371f748f918aa9fc2464c86d4332c3a97f7..32b490154b45799edef7aca44d9c42c56acaebdf 100644 (file)
                         (match_operand:DF 3 "memory_operand")))]
   "TARGET_SSE2 && TARGET_SSE_UNALIGNED_LOAD_OPTIMAL
    && ix86_operands_ok_for_move_multiple (operands, true, DFmode)"
-  [(set (match_dup 2) (match_dup 4))]
-  "operands[4] = adjust_address (operands[1], V2DFmode, 0);")
+  [(set (match_dup 2) (match_dup 5))]
+  "operands[5] = adjust_address (operands[1], V2DFmode, 0);")
 
 (define_peephole2
   [(set (match_operand:DF 0 "sse_reg_operand")
   "TARGET_SSE2 && TARGET_SSE_UNALIGNED_LOAD_OPTIMAL
    && REGNO (operands[4]) == REGNO (operands[2])
    && ix86_operands_ok_for_move_multiple (operands, true, DFmode)"
-  [(set (match_dup 2) (match_dup 4))]
-  "operands[4] = adjust_address (operands[1], V2DFmode, 0);")
+  [(set (match_dup 2) (match_dup 5))]
+  "operands[5] = adjust_address (operands[1], V2DFmode, 0);")
 
 ;; Merge movlpd/movhpd to movupd for TARGET_SSE_UNALIGNED_STORE_OPTIMAL targets.
 (define_peephole2