[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] [WinAVR 20090313] Bug in split-Pattern for swap
From: |
Georg-Johann Lay |
Subject: |
[avr-gcc-list] [WinAVR 20090313] Bug in split-Pattern for swap |
Date: |
Sat, 28 Mar 2009 23:19:43 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.7 (Windows/20050923) |
Hi guys, in pass .166r.split1, avr-gcc makes a wrong transformation for
the following testcase, compiled with -O:
void g(unsigned char);
void f1(unsigned x)
{
unsigned char y;
y = (x >> 12) & 0x0F;
g(y);
}
It deletes this insn
(insn 8 20 9 2 foo.c:7 (set (reg:QI 24 r24)
(lshiftrt:QI (reg:QI 25 r25 [ x+1 ])
(const_int 4 [0x4]))) 63 {*lshrqi3_const4}
(expr_list:REG_DEAD (reg:QI 25 r25 [ x+1 ])
(nil)))
and replaces with the obviously wrong UNSPEC_SWAP
(insn 22 20 23 2 foo.c:7 (set (reg:QI 24 r24)
(unspec:QI [
(reg:QI 24 r24)
] 2)) -1 (nil))
I didn't debug yet, seems to be a prob of missing constraints or
match_dup before reload in the splitter
(define_split ; lshrqi3_const4
[(set (match_operand:QI 0 "d_register_operand" "")
(lshiftrt:QI (match_dup 0)
(const_int 4)))]
""
[(set (match_dup 0) (unspec:QI [(match_dup 0)] UNSPEC_SWAP))
(set (match_dup 0) (and:QI (match_dup 0) (const_int 15)))]
"")
Georg-Johann
- [avr-gcc-list] [WinAVR 20090313] Bug in split-Pattern for swap,
Georg-Johann Lay <=