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 | FileCheck %s
      4 ; CHECK-NOT: br
      5 
      6 declare i32 @bitmap_clear(...)
      7 
      8 define i32 @oof() {
      9 entry:
     10         %live_head = alloca i32         ; <i32*> [#uses=2]
     11         %tmp.1 = icmp ne i32* %live_head, null          ; <i1> [#uses=1]
     12         br i1 %tmp.1, label %then, label %UnifiedExitNode
     13 
     14 then:           ; preds = %entry
     15         %tmp.4 = call i32 (...) @bitmap_clear( i32* %live_head )               ; <i32> [#uses=0]
     16         br label %UnifiedExitNode
     17 
     18 UnifiedExitNode:                ; preds = %then, %entry
     19         ret i32 0
     20 }
     21 
     22