35 lines · plain
1; RUN: opt -passes=gvn-hoist -S < %s | FileCheck %s2 3; CHECK: store4; CHECK-NOT: store5 6target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"7 8define void @f(ptr %p, i1 %arg) {9entry:10 switch i4 undef, label %if.then30 [11 i4 4, label %if.end12 i4 0, label %if.end13 ]14 15if.end:16 br label %if.end1917 18if.end19:19 br i1 %arg, label %e, label %e.thread20 21e.thread:22 store i8 0, ptr %p, align 423 br label %if.then3024 25if.then30:26 call void @g()27 unreachable28 29e:30 store i8 0, ptr %p, align 431 unreachable32}33 34declare void @g()35