On Thu, Aug 25, 2011 at 8:34 AM, Richard Guenther <richard.guent...@gmail.com> wrote: > On Thu, Aug 25, 2011 at 8:20 AM, Artem Shinkarov > <artyom.shinkar...@gmail.com> wrote: >> Here is a cleaned-up patch without the hook. Mostly it works in a way >> we discussed. >> >> So I think it is a right time to do something about vcond patterns, >> which would allow me to get rid of conversions that I need to put all >> over the code. >> >> Also at the moment the patch breaks lto frontend with a simple example: >> #define vector(elcount, type) \ >> __attribute__((vector_size((elcount)*sizeof(type)))) type >> >> int main (int argc, char *argv[]) { >> vector (4, float) f0; >> vector (4, float) f1; >> >> f0 = f1 != f0 >> ? (vector (4, float)){-1,-1,-1,-1} : (vector (4, float)){0,0,0,0}; >> >> return (int)f0[argc]; >> } >> >> test-lto.c:8:14: internal compiler error: in convert, at lto/lto-lang.c:1244 >> >> I looked into the file, the conversion function is defined as >> gcc_unreachable (). I am not very familiar with lto, so I don't really >> know what is the right way to treat the conversions. > > convert cannot be called from the middle-end, instead use fold_convert.
Thanks, great. I didn't know that. Using fold_convert solves my problem and make all my tests pass. > >> And I seriously need help with backend patterns. > > I'll look at the patch in detail later today. Thanks, Artem. > Richard. > >> >> Thanks, >> Artem. >> >