[OpenMPIRBuilderTest] Remove getPointerElementType() uses (NFC)

Use the type of the stored value instead.
This commit is contained in:
Nikita Popov 2022-02-08 11:37:42 +01:00
parent c28a522fc7
commit 179540299a
1 changed files with 4 additions and 4 deletions

View File

@ -590,7 +590,7 @@ TEST_F(OpenMPIRBuilderTest, ParallelSimple) {
// Trivial copy (=firstprivate).
Builder.restoreIP(AllocaIP);
Type *VTy = Inner.getType()->getPointerElementType();
Type *VTy = ReplacementValue->getType();
Value *V = Builder.CreateLoad(VTy, &Inner, Orig.getName() + ".reload");
ReplacementValue = Builder.CreateAlloca(VTy, 0, Orig.getName() + ".copy");
Builder.restoreIP(CodeGenIP);
@ -670,7 +670,7 @@ TEST_F(OpenMPIRBuilderTest, ParallelNested) {
Value *&ReplacementValue) -> InsertPointTy {
// Trivial copy (=firstprivate).
Builder.restoreIP(AllocaIP);
Type *VTy = Inner.getType()->getPointerElementType();
Type *VTy = ReplacementValue->getType();
Value *V = Builder.CreateLoad(VTy, &Inner, Orig.getName() + ".reload");
ReplacementValue = Builder.CreateAlloca(VTy, 0, Orig.getName() + ".copy");
Builder.restoreIP(CodeGenIP);
@ -766,7 +766,7 @@ TEST_F(OpenMPIRBuilderTest, ParallelNested2Inner) {
Value *&ReplacementValue) -> InsertPointTy {
// Trivial copy (=firstprivate).
Builder.restoreIP(AllocaIP);
Type *VTy = Inner.getType()->getPointerElementType();
Type *VTy = ReplacementValue->getType();
Value *V = Builder.CreateLoad(VTy, &Inner, Orig.getName() + ".reload");
ReplacementValue = Builder.CreateAlloca(VTy, 0, Orig.getName() + ".copy");
Builder.restoreIP(CodeGenIP);
@ -907,7 +907,7 @@ TEST_F(OpenMPIRBuilderTest, ParallelIfCond) {
// Trivial copy (=firstprivate).
Builder.restoreIP(AllocaIP);
Type *VTy = Inner.getType()->getPointerElementType();
Type *VTy = ReplacementValue->getType();
Value *V = Builder.CreateLoad(VTy, &Inner, Orig.getName() + ".reload");
ReplacementValue = Builder.CreateAlloca(VTy, 0, Orig.getName() + ".copy");
Builder.restoreIP(CodeGenIP);