brintos

brintos / llvm-project-archived public Read only

0
0
Text · 763 B · e463264 Raw
37 lines · plain
1; RUN: opt < %s -passes=gvn -S | FileCheck %s2; PR25033 4@g_3 = external global i8		; <ptr> [#uses=2]5 6define i8 @func_1(i32 %x, i32 %y) nounwind  {7entry:8  %A = alloca i89    %cmp = icmp eq i32 %x, %y10	br i1 %cmp, label %ifelse, label %ifthen11 12ifthen:		; preds = %entry13	br label %ifend14 15ifelse:		; preds = %entry16	%tmp3 = load i8, ptr @g_3		; <i8> [#uses=0]17        store i8 %tmp3, ptr %A18	br label %afterfor19 20forcond:		; preds = %forinc21	br i1 false, label %afterfor, label %forbody22 23forbody:		; preds = %forcond24	br label %forinc25 26forinc:		; preds = %forbody27	br label %forcond28 29afterfor:		; preds = %forcond, %forcond.thread30	%tmp10 = load i8, ptr @g_3		; <i8> [#uses=0]31	ret i8 %tmp1032; CHECK: ret i8 %tmp333 34ifend:		; preds = %afterfor, %ifthen35	ret i8 036}37