Re: push r1, pop r0
Matthijs Kooijman <[email protected]> Wed, 8 Nov 2017 14:14:12 +0100
| Newsgroups | gmane.comp.hardware.avr.gcc |
|---|---|
| Message-ID | <[email protected]> |
Hi Szikra, > So it is 2017, but the compiler still cannot optimize away bitwise or > zero... :( I think this is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41076 (which should be fixed in gcc 7 according to the comments). The fix contains a peephole optimization that I think catches exactly this case: 6831 (define_peephole2 6832 [(set (match_operand:QI 0 "register_operand") 6833 (const_int 0)) 6834 (set (match_dup 0) 6835 (ior:QI (match_dup 0) 6836 (match_operand:QI 1 "register_operand")))] 6837 "" 6838 [(set (match_dup 0) 6839 (match_dup 1))]) https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/avr/avr.md?r1=242907&r2=242906&pathrev=242907 Gr. Matthijs _______________________________________________ AVR-GCC-list mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEvy580OCzZ3UVDV751ZOat/ByPIMFAloDAyAACgkQ1ZOat/By PIOeOhAAhc2phXA1+WJavS+vX1KbQj0JY7MQohqYPhavfqQUSGqicPL+EShW4QbU Z2pia8qrS+bBJ3vH1BDaQKvGjb3UewSQ4ioOA+w3IpBvnvEug4FvQQeGNj2Imruf /kFPMJbW6XhS4Rn879aKSxCsYOoa9HOVpNtM9y4kYMvdr9lMEDrPgBw1B9TB1JPx VgePqtF3rzKP9bfPmYEoAfu+mVeftXmrB2OtxwqG05/jyeh16Ouzfdyvb+OsfSGQ 4SI/3tW13mWlJmKwXOntG51RWKHcnM3rvwWs98cAMAUpCPsoiJg1k8MWBTSpTRav m9ZXD1ATQ7YrL0ryLx43gBNiKVlem9oVHDX6bndhyzjIrcXl6ePL6bc6ulMSNcZp rpBsoKqrqO28voaKq3LxIpaGexMmX1gkii1JWpVkUpOuV2a21DBtDvLNEHKcx6Oi PAORhbo3FT4/l2V6I7gtvIcD9qd710STECLYBT66qSxMcYaZKCiZilzQQOs3FzPN CZF8KCXFqRkny4JzTNp1nkczgWffUkJWTgUPndzSRknNTGzNMgUpNoCl72bYHw1K Y9V5sVTzXExlZNbhDrWJIX5S9dsrJ4IAWfKHQ3NY04JKolmvOdYzCvbnFFs/JXg3 gt0lRa59Jy+SlvXJNGmfdR5dQVEDBpYmLOUlzyJlxlS1YP5JMfw= =2c30 -----END PGP SIGNATURE-----