aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-04-25 21:40:31 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2012-04-25 21:40:31 +0200
commitc1d40097cbfefceed04bbb3d3c9e14dcf7b27403 (patch)
treed914897361013a3a4fbb4d54ab0e5282746ff053 /gcc
parentff5f00c3a14ee1c74acce362af4aa879a39f50fb (diff)
downloadgcc-c1d40097cbfefceed04bbb3d3c9e14dcf7b27403.zip
gcc-c1d40097cbfefceed04bbb3d3c9e14dcf7b27403.tar.gz
gcc-c1d40097cbfefceed04bbb3d3c9e14dcf7b27403.tar.bz2
re PR target/53110 (GCC-4.7 generates stupid x86_64 asm)
PR target/53110 * config/i386/i386.md (and<mode>3): For andq $0xffffffff, reg instead expand it as zero extension. From-SVN: r186839
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.md12
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 820ba1b..a93d3cd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/53110
+ * config/i386/i386.md (and<mode>3): For andq $0xffffffff, reg
+ instead expand it as zero extension.
+
2012-04-25 H.J. Lu <hongjiu.lu@intel.com>
PR debug/52857
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 0b2fe55..60439f9 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -7694,7 +7694,17 @@
(and:SWIM (match_operand:SWIM 1 "nonimmediate_operand")
(match_operand:SWIM 2 "<general_szext_operand>")))]
""
- "ix86_expand_binary_operator (AND, <MODE>mode, operands); DONE;")
+{
+ if (<MODE>mode == DImode
+ && GET_CODE (operands[2]) == CONST_INT
+ && INTVAL (operands[2]) == (HOST_WIDE_INT) 0xffffffff
+ && REG_P (operands[1]))
+ emit_insn (gen_zero_extendsidi2 (operands[0],
+ gen_lowpart (SImode, operands[1])));
+ else
+ ix86_expand_binary_operator (AND, <MODE>mode, operands);
+ DONE;
+})
(define_insn "*anddi_1"
[(set (match_operand:DI 0 "nonimmediate_operand" "=r,rm,r,r")