Home | History | Annotate | Download | only in JumpThreading
      1 ; RUN: opt -jump-threading -S < %s | FileCheck %s
      2 
      3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
      4 target triple = "x86_64-apple-macosx10.11.0"
      5 
      6 declare void @helper()
      7 declare i32 @__gxx_personality_v0(...)
      8 
      9 
     10 define void @pr27840(i8* %call, i1 %A) personality i32(...)* @__gxx_personality_v0 {
     11 entry:
     12   invoke void @helper()
     13           to label %invoke.cont unwind label %lpad
     14 
     15 ; Don't jump threading; we can't split the critical edge from entry to lpad.
     16 ; CHECK-LABEL: @pr27840
     17 ; CHECK: invoke
     18 ; CHECK-NEXT: to label %invoke.cont unwind label %lpad
     19 
     20 invoke.cont:
     21   invoke void @helper()
     22           to label %nowhere unwind label %lpad
     23 
     24 lpad:
     25   %b = phi i1 [ true, %invoke.cont ], [ false, %entry ]
     26   landingpad { i8*, i32 }
     27           cleanup
     28   %xor = xor i1 %b, %A
     29   br i1 %xor, label %nowhere, label %invoke.cont
     30 
     31 nowhere:
     32   unreachable
     33 }
     34