Home | History | Annotate | Download | only in X86
      1 ; RUN: opt -S < %s -unreachableblockelim | FileCheck %s
      2 ; RUN: opt -S < %s -passes=unreachableblockelim | FileCheck %s
      3 
      4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
      5 target triple = "x86_64-unknown-linux-gnu"
      6 
      7 declare void @abort()
      8 
      9 ; CHECK-LABEL: @foo(
     10 ; CHECK-NOT return:
     11 define void @foo(i32* %p) {
     12 entry:
     13   %p.addr = alloca i32*, align 8
     14   call void @abort()
     15   unreachable
     16 
     17 return:                                           ; No predecessors!
     18   store i32* %p, i32** %p.addr, align 8
     19   ret void
     20 }
     21 
     22