Differential Revision: https://reviews.llvm.org/D65908
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368350
91177308-0d34-0410-b5e6-
96231b3b80d8
bool isHoistableAndSinkableInst(Instruction &I) {
// Only these instructions are hoistable/sinkable.
return (isa<LoadInst>(I) || isa<StoreInst>(I) || isa<CallInst>(I) ||
- isa<FenceInst>(I) || isa<BinaryOperator>(I) || isa<CastInst>(I) ||
+ isa<FenceInst>(I) || isa<CastInst>(I) ||
+ isa<UnaryOperator>(I) || isa<BinaryOperator>(I) ||
isa<SelectInst>(I) || isa<GetElementPtrInst>(I) || isa<CmpInst>(I) ||
isa<InsertElementInst>(I) || isa<ExtractElementInst>(I) ||
isa<ShuffleVectorInst>(I) || isa<ExtractValueInst>(I) ||
}
; CHECK: define void @test6(float %f)
-; CHECK: call
; CHECK: fneg
-; CHECK: call
+; CHECK: br label %for.body
define void @test6(float %f) #2 {
entry:
br label %for.body