brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.5 KiB · 4b73909 Raw
83 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes='loop-mssa(licm,loop-simplifycfg)' < %s | FileCheck %s3 4; Here we end un sinking a user of token down from the loop, therefore breaching LCSSA form.5; Then, LoopSimplifyCFG expcets that LCSSA form is maintained, and remains unaware that6; it may be penetrated by tokens. As result, it may end up breaking dominance between def and7; use by introducing fake temporary edges.8 9define ptr addrspace(1) @test_gc_relocate() gc "statepoint-example" {10; CHECK-LABEL: @test_gc_relocate(11; CHECK-NEXT:    br label [[BB1:%.*]]12; CHECK:       bb1:13; CHECK-NEXT:    switch i32 undef, label [[BB43:%.*]] [14; CHECK-NEXT:    i32 1, label [[BB18:%.*]]15; CHECK-NEXT:    ]16; CHECK:       bb18:17; CHECK-NEXT:    switch i32 undef, label [[BB43]] [18; CHECK-NEXT:    i32 0, label [[BB28:%.*]]19; CHECK-NEXT:    ]20; CHECK:       bb28:21; CHECK-NEXT:    [[TMP34:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(ptr addrspace(1) (i64, i32, i32, i32)) @barney.4, i32 4, i32 0, i64 undef, i32 5, i32 5, i32 undef, i32 0, i32 0) [ "deopt"(), "gc-live"(ptr addrspace(1) undef) ]22; CHECK-NEXT:    br i1 false, label [[BB57:%.*]], label [[BB36:%.*]]23; CHECK:       bb36:24; CHECK-NEXT:    switch i32 undef, label [[BB43]] [25; CHECK-NEXT:    i32 1, label [[BB39:%.*]]26; CHECK-NEXT:    ]27; CHECK:       bb39:28; CHECK-NEXT:    switch i32 undef, label [[BB43]] [29; CHECK-NEXT:    i32 1, label [[BB45:%.*]]30; CHECK-NEXT:    ]31; CHECK:       bb43:32; CHECK-NEXT:    unreachable33; CHECK:       bb45:34; CHECK-NEXT:    br label [[BB1]]35; CHECK:       bb57:36; CHECK-NEXT:    [[TMP35_LE:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[TMP34]], i32 0, i32 0)37; CHECK-NEXT:    ret ptr addrspace(1) [[TMP35_LE]]38;39  br label %bb140 41bb1:                                              ; preds = %bb45, %042  switch i32 undef, label %bb43 [43  i32 1, label %bb1844  ]45 46bb18:                                             ; preds = %bb147  switch i32 undef, label %bb43 [48  i32 0, label %bb2849  ]50 51bb28:                                             ; preds = %bb1852  %tmp34 = call token (i64, i32, ptr addrspace(1) (i64, i32, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr addrspace(1) (i64, i32, i32, i32)* nonnull elementtype(ptr addrspace(1) (i64, i32, i32, i32)) @barney.4, i32 4, i32 0, i64 undef, i32 5, i32 5, i32 undef, i32 0, i32 0) [ "deopt"(), "gc-live"(ptr addrspace(1) undef) ]53  %tmp35 = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %tmp34, i32 0, i32 0) ; (undef, undef)54  br i1 false, label %bb57, label %bb3655 56bb36:                                             ; preds = %bb2857  switch i32 undef, label %bb43 [58  i32 1, label %bb3959  ]60 61bb39:                                             ; preds = %bb3662  switch i32 undef, label %bb43 [63  i32 1, label %bb4564  ]65 66bb43:                                             ; preds = %bb39, %bb36, %bb18, %bb167  unreachable68 69bb45:                                             ; preds = %bb3970  br label %bb171 72bb57:                                             ; preds = %bb2873  ret ptr addrspace(1) %tmp3574}75 76declare ptr addrspace(1) @barney.4(i64, i32, i32, i32)77 78declare ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token, i32 immarg, i32 immarg) #079 80declare token @llvm.experimental.gc.statepoint.p0(i64 immarg, i32 immarg, ptr addrspace(1) (i64, i32, i32, i32)*, i32 immarg, i32 immarg, ...)81 82attributes #0 = { nounwind readnone }83