• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -memcpyopt -mldst-motion -gvn -S | FileCheck %s
2
3define void @foo(i8* %ret, i1 %x) {
4  %a = alloca i8
5  br i1 %x, label %yes, label %no
6
7yes:                                              ; preds = %0
8  %gepa = getelementptr i8, i8* %a, i64 0
9  store i8 5, i8* %gepa
10  br label %out
11
12no:                                               ; preds = %0
13  %gepb = getelementptr i8, i8* %a, i64 0
14  store i8 5, i8* %gepb
15  br label %out
16
17out:                                              ; preds = %no, %yes
18  %tmp = load i8, i8* %a
19; CHECK-NOT: undef
20  store i8 %tmp, i8* %ret
21  ret void
22}
23