[Bug target/67057] [SH] Use negc to calculate 1-T+const_int

2015-07-29 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67057 --- Comment #2 from Oleg Endo --- (In reply to Oleg Endo from comment #0) > Combine is looking for a pattern: > > Failed to match this instruction: > (set (reg:SI 162 [ D.1652 ]) > (plus:SI (zero_extract:SI (reg:SI 4 r4 [ a ]) >

[Bug target/67057] [SH] Use negc to calculate 1-T+const_int

2015-07-29 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67057 --- Comment #1 from Oleg Endo --- For some cases where T+const_int is calculated, like ... int foo (int a, int b) { return a == b ? 5 : 4; } comiled with -O2: cmp/eq r5,r4 movtr0 rts add #4,r0 ..