* ifcvt.c (dead_or_predicable): Return TRUE if squeeze_notes doesn't
find any real instructions.
+ * config/ia64/ia64.c (ia64_adjust_cost): Handle SUBREGs.
+
2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
* c-common.c: Include c-lex.h.
src = set ? SET_SRC (set) : 0;
addr = 0;
- if (set && GET_CODE (SET_DEST (set)) == MEM)
- addr = XEXP (SET_DEST (set), 0);
- else if (set && GET_CODE (src) == MEM)
- addr = XEXP (src, 0);
- else if (set && GET_CODE (src) == ZERO_EXTEND
- && GET_CODE (XEXP (src, 0)) == MEM)
- addr = XEXP (XEXP (src, 0), 0);
- else if (set && GET_CODE (src) == UNSPEC
- && XVECLEN (XEXP (src, 0), 0) > 0
- && GET_CODE (XVECEXP (src, 0, 0)) == MEM)
- addr = XEXP (XVECEXP (src, 0, 0), 0);
+ if (set)
+ {
+ if (GET_CODE (SET_DEST (set)) == MEM)
+ addr = XEXP (SET_DEST (set), 0);
+ else if (GET_CODE (SET_DEST (set)) == SUBREG
+ && GET_CODE (SUBREG_REG (SET_DEST (set))) == MEM)
+ addr = XEXP (SUBREG_REG (SET_DEST (set)), 0);
+ else
+ {
+ addr = src;
+ if (GET_CODE (addr) == UNSPEC && XVECLEN (addr, 0) > 0)
+ addr = XVECEXP (addr, 0, 0);
+ while (GET_CODE (addr) == SUBREG || GET_CODE (addr) == ZERO_EXTEND)
+ addr = XEXP (addr, 0);
+ if (GET_CODE (addr) == MEM)
+ addr = XEXP (addr, 0);
+ else
+ addr = 0;
+ }
+ }
+
if (addr && GET_CODE (addr) == POST_MODIFY)
addr = XEXP (addr, 0);
--- /dev/null
+typedef struct { int c, d, e, f, g; } D;
+
+void bar (unsigned long, unsigned long);
+void foo (D *y)
+{
+ int x = 0;
+
+ if (y->f == 0)
+ x |= 0x1;
+ if (y->g == 0)
+ x |= 0x2;
+ bar ((x << 16) | (y->c & 0xffff), (y->d << 16) | (y->e & 0xffff));
+}