The following code causes opt to not terminate! With TOT this morning, and of a week ago: clang foo.c and clang -O1 foo.c work fine. clang -O2 foo.c and clang -O3 foo.c do not terminate. (At least after 10 minutes) If I generate the bit code (clang-cc -emit-llvmbc) and then run: opt -O3 foo.bc it does not terminate. //foo.c int get_id(int); typedef short short2 __attribute__ ((vector_size (2))); union _X { short2 s; int i; }; typedef union _X X; inline short2 as_short2(int x) { X result; result.i = x; return result.s; } inline int as_int(short2 x) { X result; result.s = x; return result.i; } void short2_int_swap( short2* b, int* c) { int gidx = get_id(0); short2 bval = b[gidx]; int cval = c[gidx]; b[gidx] = as_short2(cval); c[gidx] = as_int(bval); } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090904/cd0940bf/attachment.html>
On Fri, Sep 4, 2009 at 9:37 AM, Gaster, Benedict<Benedict.Gaster at amd.com> wrote:> The following code causes opt to not terminate!Please flle in bugzilla with a bitcode testcase; it would help to reduce the testcase using bugpoint. -Eli
I minimized and filed as http://llvm.org/bugs/show_bug.cgi?id=4908 - Daniel On Sat, Sep 5, 2009 at 2:26 AM, Eli Friedman<eli.friedman at gmail.com> wrote:> On Fri, Sep 4, 2009 at 9:37 AM, Gaster, Benedict<Benedict.Gaster at amd.com> wrote: >> The following code causes opt to not terminate! > > Please flle in bugzilla with a bitcode testcase; it would help to > reduce the testcase using bugpoint. > > -Eli > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
On Sep 4, 2009, at 9:37 AM, Gaster, Benedict wrote:> The following code causes opt to not terminate!This works for me now, please file bugs when you hit problems. -Chris> > With TOT this morning, and of a week ago: > > clang foo.c and clang –O1 foo.c > > work fine. > > clang –O2 foo.c and clang –O3 foo.c > > do not terminate. (At least after 10 minutes) > > If I generate the bit code (clang-cc –emit-llvmbc) and then run: > > opt –O3 foo.bc > > it does not terminate. > > //foo.c > int get_id(int); > > typedef short short2 __attribute__ ((vector_size (2))); > > union _X { > short2 s; > int i; > }; > > typedef union _X X; > > inline short2 as_short2(int x) > { > X result; > > result.i = x; > return result.s; > } > > inline int as_int(short2 x) > { > X result; > > result.s = x; > return result.i; > } > > void short2_int_swap( > short2* b, > int* c) > { > int gidx = get_id(0); > short2 bval = b[gidx]; > int cval = c[gidx]; > > b[gidx] = as_short2(cval); > c[gidx] = as_int(bval); > } > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090907/dad04ca8/attachment.html>