brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 8a9ae0a Raw
57 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -S -passes=jump-threading | FileCheck %s3 4; This test used to cause jump threading to try to split an edge of a callbr.5 6@a = global i32 07 8define i32 @c() {9; CHECK-LABEL: @c(10; CHECK-NEXT:  entry:11; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @a, align 412; CHECK-NEXT:    [[TOBOOL:%.*]] = icmp eq i32 [[TMP0]], 013; CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_ELSE:%.*]], label [[IF_END:%.*]]14; CHECK:       if.else:15; CHECK-NEXT:    callbr void asm sideeffect "", "!i"()16; CHECK-NEXT:    to label [[IF_THEN2:%.*]] [label %if.then2]17; CHECK:       if.end:18; CHECK-NEXT:    [[CALL:%.*]] = call i32 @b()19; CHECK-NEXT:    [[PHITMP:%.*]] = icmp ne i32 [[CALL]], 020; CHECK-NEXT:    br i1 [[PHITMP]], label [[IF_THEN2]], label [[IF_END4:%.*]]21; CHECK:       if.then2:22; CHECK-NEXT:    [[CALL3:%.*]] = call i32 @b()23; CHECK-NEXT:    br label [[IF_END4]]24; CHECK:       if.end4:25; CHECK-NEXT:    ret i32 undef26;27entry:28  %0 = load i32, ptr @a29  %tobool = icmp eq i32 %0, 030  br i1 %tobool, label %if.else, label %if.then31 32if.then:                                          ; preds = %entry33  %call = call i32 @b() #234  %phitmp = icmp ne i32 %call, 035  br label %if.end36 37if.else:                                          ; preds = %entry38  callbr void asm sideeffect "", "!i"() #239  to label %normal [label %if.end]40 41normal:                                           ; preds = %if.else42  br label %if.end43 44if.end:                                           ; preds = %if.else, %normal, %if.then45  %d.0 = phi i1 [ %phitmp, %if.then ], [ undef, %normal ], [ undef, %if.else ]46  br i1 %d.0, label %if.then2, label %if.end447 48if.then2:                                         ; preds = %if.end49  %call3 = call i32 @b()50  br label %if.end451 52if.end4:                                          ; preds = %if.then2, %if.end53  ret i32 undef54}55 56declare i32 @b()57