This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, i386]: Use gen_int_mode to truncate const_int operand
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 9 Feb 2016 18:45:45 +0100
- Subject: [PATCH, i386]: Use gen_int_mode to truncate const_int operand
- Authentication-results: sourceware.org; auth=none
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")