Home | History | Annotate | Download | only in GVN
      1 ; RUN: opt < %s -basicaa -gvn -S | grep "ret i8 [%]tmp3"
      2 ; PR2503
      3 
      4 @g_3 = external global i8		; <i8*> [#uses=2]
      5 
      6 define i8 @func_1(i32 %x, i32 %y) nounwind  {
      7 entry:
      8   %A = alloca i8
      9     %cmp = icmp eq i32 %x, %y
     10 	br i1 %cmp, label %ifelse, label %ifthen
     11 
     12 ifthen:		; preds = %entry
     13 	br label %ifend
     14 
     15 ifelse:		; preds = %entry
     16 	%tmp3 = load i8, i8* @g_3		; <i8> [#uses=0]
     17         store i8 %tmp3, i8* %A
     18 	br label %afterfor
     19 
     20 forcond:		; preds = %forinc
     21 	br i1 false, label %afterfor, label %forbody
     22 
     23 forbody:		; preds = %forcond
     24 	br label %forinc
     25 
     26 forinc:		; preds = %forbody
     27 	br label %forcond
     28 
     29 afterfor:		; preds = %forcond, %forcond.thread
     30 	%tmp10 = load i8, i8* @g_3		; <i8> [#uses=0]
     31 	ret i8 %tmp10
     32 
     33 ifend:		; preds = %afterfor, %ifthen
     34 	ret i8 0
     35 }
     36