brintos

brintos / llvm-project-archived public Read only

0
0
Text · 951 B · 7c9bb1b Raw
39 lines · plain
1; RUN: opt -passes=simple-loop-unswitch,loop-deletion -verify-memoryssa -S < %s | FileCheck %s2;3; Check that when we do unswitching where we re-enqueue the loop to be processed4; again, but manage to delete the loop before ever getting to iterate on it, it5; doesn't crash the legacy pass manager.6 7target triple = "x86_64-unknown-linux-gnu"8 9define void @pr37888() {10; CHECK-LABEL: define void @pr37888()11entry:12  %tobool = icmp ne i16 undef, 013  br label %for.body14; CHECK:         %[[TOBOOL:.*]] = icmp ne15; CHECK-NEXT:    br i1 %[[TOBOOL]], label %if.then, label %[[ENTRY_SPLIT:.*]]16;17; CHECK:       [[ENTRY_SPLIT]]:18; CHECK-NEXT:    br label %for.end19 20for.body:21  br i1 %tobool, label %if.then, label %if.end22 23if.then:24  unreachable25; CHECK:       if.then:26; CHECK-NEXT:    unreachable27 28if.end:29  br label %for.inc30 31for.inc:32  br i1 false, label %for.body, label %for.end33 34for.end:35  ret void36; CHECK:       for.end:37; CHECK-NEXT:    ret void38}39