Home | History | Annotate | Download | only in LICM
      1 ; RUN: opt < %s -licm -S | FileCheck %s
      2 ; Promote value if at least one use is safe
      3 
      4 
      5 define i32 @f2(i32* %p, i8* %q) {
      6 entry:
      7         br label %loop.head
      8 
      9 loop.head:              ; preds = %cond.true, %entry
     10         store i32 20, i32* %p
     11         %tmp3.i = icmp eq i8* null, %q            ; <i1> [#uses=1]
     12         br i1 %tmp3.i, label %exit, label %cond.true
     13         
     14 cond.true:              ; preds = %loop.head
     15         store i32 40, i32* %p
     16         br label %loop.head
     17 
     18 ; CHECK: exit:
     19 ; CHECK: store i32 20, i32* %p
     20 exit:           ; preds = %loop.head
     21         ret i32 0
     22 }
     23 
     24