brintos

brintos / llvm-project-archived public Read only

0
0
Text · 569 B · b32e2dc Raw
25 lines · plain
1; REQUIRES: asserts2; RUN: opt -passes='simple-loop-unswitch<nontrivial>' -disable-output -S < %s3; RUN: opt -passes='loop-mssa(simple-loop-unswitch<nontrivial>)' -disable-output -S < %s4 5; This loop shouldn't trigger asserts in SimpleLoopUnswitch.6define void @test_redundant_switch(ptr %ptr, i32 %cond) {7entry:8  br label %loop_begin9 10loop_begin:11  switch i32 %cond, label %loop_body [12      i32 0, label %loop_body13  ]14 15loop_body:16  br label %loop_latch17 18loop_latch:19  %v = load i1, ptr %ptr20  br i1 %v, label %loop_begin, label %loop_exit21 22loop_exit:23  ret void24}25