@@ -367,10 +367,9 @@ TEST_F(AliasAnalysisTest, PartialAliasOffsetSign) {
367
367
368
368
TEST_F (AliasAnalysisTest, IsNoAliasForInstructions) {
369
369
// Create global variable
370
- auto *GlobalVar = new GlobalVariable (M, Type::getInt32Ty (C), false ,
371
- GlobalValue::ExternalLinkage,
372
- ConstantInt::get (Type::getInt32Ty (C), 0 ),
373
- " g" );
370
+ auto *GlobalVar = new GlobalVariable (
371
+ M, Type::getInt32Ty (C), false , GlobalValue::ExternalLinkage,
372
+ ConstantInt::get (Type::getInt32Ty (C), 0 ), " g" );
374
373
GlobalVar->setAlignment (Align (4 ));
375
374
376
375
// Create function declarations
@@ -380,15 +379,18 @@ TEST_F(AliasAnalysisTest, IsNoAliasForInstructions) {
380
379
381
380
// Create test function
382
381
FunctionType *TestFnTy = FunctionType::get (Type::getInt32Ty (C), false );
383
- Function *TestFn = Function::Create (TestFnTy, Function::ExternalLinkage, " test" , M);
384
-
382
+ Function *TestFn =
383
+ Function::Create (TestFnTy, Function::ExternalLinkage, " test" , M);
384
+
385
385
// Create basic block
386
386
BasicBlock *BB = BasicBlock::Create (C, " entry" , TestFn);
387
-
387
+
388
388
// Create instructions
389
389
auto *Alloca = new AllocaInst (Type::getInt32Ty (C), 0 , " p" , BB);
390
- auto *Store1 = new StoreInst (ConstantInt::get (Type::getInt32Ty (C), 42 ), Alloca, BB);
391
- auto *Store2 = new StoreInst (ConstantInt::get (Type::getInt32Ty (C), 100 ), GlobalVar, BB);
390
+ auto *Store1 =
391
+ new StoreInst (ConstantInt::get (Type::getInt32Ty (C), 42 ), Alloca, BB);
392
+ auto *Store2 =
393
+ new StoreInst (ConstantInt::get (Type::getInt32Ty (C), 100 ), GlobalVar, BB);
392
394
auto *Call1 = CallInst::Create (M.getFunction (" foo" ), {}, BB);
393
395
auto *Call2 = CallInst::Create (M.getFunction (" bar" ), {}, BB);
394
396
auto *Load = new LoadInst (Type::getInt32Ty (C), Alloca, " val" , BB);
@@ -401,7 +403,6 @@ TEST_F(AliasAnalysisTest, IsNoAliasForInstructions) {
401
403
EXPECT_EQ (false , AA.isNoAlias (Store2, Call1));
402
404
EXPECT_EQ (false , AA.isNoAlias (Call1, Call2));
403
405
EXPECT_EQ (true , AA.isNoAlias (Store2, Load));
404
-
405
406
}
406
407
407
408
class AAPassInfraTest : public testing ::Test {
0 commit comments