1 ; RUN: opt < %s -jump-threading -S -verify | FileCheck %s
3 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-pc-windows-msvc19.16.27026"
6 ; Verify that we do *not* thread any edge. On Windows, we used to
7 ; improperly duplicate EH pads like bb_cleanup below, resulting in an
8 ; assertion failure later down the pass pipeline.
9 define void @foo([2 x i8]* %0) personality i8* bitcast (i32 ()* @baz to i8*) {
11 ; CHECK-NOT: bb_{{[^ ]*}}.thread:
14 to label %bb_invoke unwind label %bb_cleanuppad
18 to label %bb_exit unwind label %bb_cleanuppad
21 %index = phi i64 [ 1, %bb_invoke ], [ 0, %entry ]
22 %cond1 = phi i1 [ false, %bb_invoke ], [ true, %entry ]
23 %1 = cleanuppad within none []
24 br i1 %cond1, label %bb_action, label %bb_cleanupret
27 %cond2 = icmp eq i64 %index, 0
28 br i1 %cond2, label %bb_cleanupret, label %bb_exit
35 cleanupret from %1 unwind to caller