That trick worked. Filed as bug 9841.<br><br>Thanks,<br>Arushi<br><br><div class="gmail_quote">On Wed, May 4, 2011 at 7:12 AM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im"><br>
On May 3, 2011, at 3:25 PM, Arushi Aggarwal wrote:<br>
<br>
> Hi,<br>
><br>
> GVN seems to be running in an infinite loop on my example. I have attached the output of one iteration. I cant seem to reduce the testcase either.<br>
><br>
> Any pointers to how to reduce the test case.<br>
<br>
</div>Bugzilla can reduce testcases that cause infinite loops (it has a -timeout flag), I'd try it.  Even if this doesn't help, please do file a bug with whatever you have.  This is likely to be a recent regression.<br>


<font color="#888888"><br>
-Chris<br>
</font><div><div></div><div class="h5"><br>
><br>
> THanks,<br>
> Arushi<br>
><br>
> GVN iteration: 8<br>
> GVN WIDENED LOAD:   %0 = load i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23), align 2, !dbg !875<br>
> TO:   %1 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
> GVN COERCED INST:<br>
>   %0 = load i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23), align 2, !dbg !875<br>
>   %1 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
>   %3 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
><br>
><br>
> GVN removed:   %3 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
> GVN WIDENED LOAD:   %0 = load i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23), align 2, !dbg !875<br>
> TO:   %1 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
> GVN COERCED INST:<br>
>   %0 = load i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23), align 2, !dbg !875<br>
>   %1 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
>   %6 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
><br>
><br>
> GVN removed:   %6 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
> GVN WIDENED LOAD:   %0 = load i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23), align 2, !dbg !875<br>
> TO:   %1 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
> GVN COERCED INST:<br>
>   %0 = load i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23), align 2, !dbg !875<br>
>   %1 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
>   %9 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
><br>
><br>
> GVN removed:   %9 = load i16* bitcast (i8* getelementptr inbounds (%struct.CHESS_POSITION* @search, i64 0, i32 23) to i16*), align 2<br>
> GVN removed:   %10 = trunc i16 %1 to i8<br>
> GVN removed:   %10 = trunc i16 %3 to i8<br>
> GVN removed:   %10 = trunc i16 %5 to i8<br>
> GVN iteration: 9<br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
</div></div></blockquote></div><br>