• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -jump-threading -S < %s | FileCheck %s
2
3target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-apple-macosx10.11.0"
5
6declare void @helper()
7declare i32 @__gxx_personality_v0(...)
8
9
10define void @pr27840(i8* %call, i1 %A) personality i32(...)* @__gxx_personality_v0 {
11entry:
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
20invoke.cont:
21  invoke void @helper()
22          to label %nowhere unwind label %lpad
23
24lpad:
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
31nowhere:
32  unreachable
33}
34