Home | History | Annotate | Download | only in InstCombine
      1 ; This testcase can be simplified by "realizing" that alloca can never return 
      2 ; null.
      3 ; RUN: opt < %s -instcombine -simplifycfg -S | not grep br
      4 
      5 declare i32 @bitmap_clear(...)
      6 
      7 define i32 @oof() {
      8 entry:
      9         %live_head = alloca i32         ; <i32*> [#uses=2]
     10         %tmp.1 = icmp ne i32* %live_head, null          ; <i1> [#uses=1]
     11         br i1 %tmp.1, label %then, label %UnifiedExitNode
     12 
     13 then:           ; preds = %entry
     14         %tmp.4 = call i32 (...)* @bitmap_clear( i32* %live_head )               ; <i32> [#uses=0]
     15         br label %UnifiedExitNode
     16 
     17 UnifiedExitNode:                ; preds = %then, %entry
     18         ret i32 0
     19 }
     20 
     21