This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why doesn't GCC generate conditional move for COND_EXPR?


On Mon, Oct 24, 2011 at 7:00 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Mon, Oct 24, 2011 at 2:55 PM, Bingfeng Mei <bmei@broadcom.com> wrote:
>> Hello,
>> I noticed that COND_EXPR is not expanded to conditional move
>> as MIN_EXPR/MAX_EXPR are (assuming movmodecc is available).
>> I wonder why not?
>>
>> I have some loop that fails tree vectorization, but still contains
>> COND_EXPR from tree ifcvt pass. In the end, the generated code
>> is worse than if I don't turned -ftree-vectorize on. ÂThis
>> is on our private port.
>
> Because nobody touched COND_EXPR expansion since ages.

I have a patch which I will be submitting next week or so that does
this expansion correctly.  In fact I have a few patches which improves
the generation of COND_EXPR in simple cases (in PHI-OPT).

Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]