diff mbox

[i386] : Use gen_int_mode to truncate const_int operand

Message ID CAFULd4Z9K41zCZf+k8FTo63FMEYEdfXF_NiusnD_SdSs4=nJGw@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Feb. 9, 2016, 5:45 p.m. UTC
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.
diff mbox

Patch

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")