This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, i386]: Use gen_int_mode to truncate const_int operand


Hello!

No need to go through all subreg processing, we already know we have
const_int here.

2016-02-09  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.md (insv<mode>_1): Use gen_int_mode to
    truncate const_int operand 1 to QImode.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32},
committed to mainline SVN.

Uros.

Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md (revision 233245)
+++ config/i386/i386.md (working copy)
@@ -2883,7 +2883,7 @@
   ""
 {
   if (CONST_INT_P (operands[1]))
-    operands[1] = simplify_gen_subreg (QImode, operands[1], <MODE>mode, 0);
+    operands[1] = gen_int_mode (INTVAL (operands[1]), QImode);
   return "mov{b}\t{%b1, %h0|%h0, %b1}";
 }
   [(set_attr "isa" "*,nox64")


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]