Richard Henderson wrote: > On 07/26/2011 02:48 AM, Georg-Johann Lay wrote: >> Moreover, the original peep2 is not fully correct because it >> maps a 16-bit shift to a 8-bit one. The correct mapping is >> >> (set (match_dup 2) >> (subreg:QI (ashift:HI (zero_extend:HI (match_dup 2)) >> (match_dup 1)) >> 0)) >> >> instead of >> >> (set (match_dup 2) >> (ashift:QI (match_dup 2) >> (match_dup 1))) >> >> I don't think it makes a difference that late in the >> compilation process, yet I prefer correct semantics. > > Why do you think the semantics were wrong? As long as you > don't define SHIFT_COUNT_TRUNCATES, these are equivalent. > > r~
If -mint8 (word_mode = QImode) ever returns resp. is turned functional again, then the QI version is undefined for offsets >= 8 whereas the HI version is only undefined for offsets >= 16.