mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
Fix use after free in unit test.
llvm-svn: 309952
This commit is contained in:
parent
8a63798467
commit
d7066bff7d
@ -1000,9 +1000,9 @@ TEST_F(ScalarEvolutionsTest, SCEVExitLimitForgetLoop) {
|
||||
Cond->eraseFromParent();
|
||||
|
||||
Builder.SetInsertPoint(L);
|
||||
Builder.CreateICmp(ICmpInst::ICMP_SLT, Add, ConstantInt::get(T_int64, 2000),
|
||||
"new.cond");
|
||||
Builder.CreateCondBr(Cond, L, Post);
|
||||
auto *NewCond = Builder.CreateICmp(
|
||||
ICmpInst::ICMP_SLT, Add, ConstantInt::get(T_int64, 2000), "new.cond");
|
||||
Builder.CreateCondBr(NewCond, L, Post);
|
||||
const SCEV *NewEC = SE.getBackedgeTakenCount(Loop);
|
||||
EXPECT_NE(EC, NewEC);
|
||||
}
|
||||
@ -1081,9 +1081,9 @@ TEST_F(ScalarEvolutionsTest, SCEVExitLimitForgetValue) {
|
||||
Load->eraseFromParent();
|
||||
|
||||
Builder.SetInsertPoint(L);
|
||||
Builder.CreateICmp(ICmpInst::ICMP_SLT, Add, ConstantInt::get(T_int64, 2000),
|
||||
"new.cond");
|
||||
Builder.CreateCondBr(Cond, L, Post);
|
||||
auto *NewCond = Builder.CreateICmp(
|
||||
ICmpInst::ICMP_SLT, Add, ConstantInt::get(T_int64, 2000), "new.cond");
|
||||
Builder.CreateCondBr(NewCond, L, Post);
|
||||
const SCEV *NewEC = SE.getBackedgeTakenCount(Loop);
|
||||
EXPECT_NE(EC, NewEC);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user