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