Home | History | Annotate | Download | only in GVNHoist
      1 ; RUN: opt -gvn-hoist %s -S -o - | FileCheck %s
      2 
      3 ; CHECK: store
      4 ; CHECK-NOT: store
      5 
      6 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
      7 
      8 define void @f(i8* %p) {
      9 entry:
     10   switch i4 undef, label %if.then30 [
     11     i4 4, label %if.end
     12     i4 0, label %if.end
     13   ]
     14 
     15 if.end:
     16   br label %if.end19
     17 
     18 if.end19:
     19   br i1 undef, label %e, label %e.thread
     20 
     21 e.thread:
     22   store i8 0, i8* %p, align 4
     23   br label %if.then30
     24 
     25 if.then30:
     26   call void @g()
     27   unreachable
     28 
     29 e:
     30   store i8 0, i8* %p, align 4
     31   unreachable
     32 }
     33 
     34 declare void @g()
     35