Combine pass with reused sources

2013-08-12 Thread Lu, John
Hi, I'm working on compiler for an architecture with a multiply instruction that takes two 32-bit factors, sign-extends both factors to 64-bits and then does a 64-bit multiplication and stores the result to a destination register. The combine pass successfully generates the pattern (mulhizi3) f

clz pattern

2011-06-29 Thread Lu, John
Hi, I'm trying to utilize the clz pattern: (define_insn "clzhi2" [(set (match_operand:HI 0 "register_operand" "=r") (clz:HI (match_operand:HI 1 "register_operand" "r")))] "" "cntlz %0 %1") I can build a compiler successfully with this pattern, but I can't find any C source

Make minmax detection more flexible in tree-ssa-phiopt.c

2011-02-23 Thread Lu, John
Hi, I'm trying to improve the asm code generated for C code like: long f(long a, long b) { _int64 s; s = (((long long) a) + ((long long) b)); s = (s > 0x7fffL ? (long) 0x7fffL : (s <-0x8000L ? (long)-0x8000L : s)); return(

LIM/Alias Analysis performance issue

2010-04-16 Thread Lu, John
Hi, I've encountered a performance issue in a port of GCC I'm working on, where the behavior of LIM is affected by the ordering of fields in a structure. I've been able to re-create it with a GCC 4.3.1 Linux X86 compiler. With GCC 4.3.1 Linux X86, when I compile: struct foo { int *p