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
signature.asc
Description: PGP signature
_______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-gcc-list