// TODO: Handle: br (VARIANT|INVARIANT).
// TODO: Hoist simple expressions out of loops.
- if (Instruction *I = dyn_cast<Instruction>(Cond))
- if (!L->contains(I->getParent()))
- return 0;
+ if (L->isLoopInvariant(Cond)) return Cond;
if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Cond))
if (BO->getOpcode() == Instruction::And ||
-; RUN: llvm-as < %s | opt -loop-unswitch -stats | not grep loop-unswitch
+; RUN: llvm-as < %s | opt -loop-unswitch -verify -disable-output
define void @test_fc_while_continue_or(float %x, float %y, float* %result) nounwind {