diff options
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp index c084b48fdc4..fe816ebb68e 100644 --- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp @@ -1910,8 +1910,7 @@ void NVPTXAsmPrinter::bufferLEByte(const Constant *CPV, int Bytes, case Type::ArrayTyID: case Type::VectorTyID: case Type::StructTyID: { - if (isa<ConstantArray>(CPV) || isa<ConstantVector>(CPV) || - isa<ConstantStruct>(CPV) || isa<ConstantDataSequential>(CPV)) { + if (isa<ConstantAggregate>(CPV) || isa<ConstantDataSequential>(CPV)) { int ElementSize = DL.getTypeAllocSize(CPV->getType()); bufferAggregateConstant(CPV, aggBuffer); if (Bytes > ElementSize) diff --git a/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp b/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp index 5ace765f260..af418f0e3da 100644 --- a/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp @@ -230,8 +230,7 @@ Value *GenericToNVVM::remapConstant(Module *M, Function *F, Constant *C, if (I != GVMap.end()) { NewValue = getOrInsertCVTA(M, F, I->second, Builder); } - } else if (isa<ConstantVector>(C) || isa<ConstantArray>(C) || - isa<ConstantStruct>(C)) { + } else if (isa<ConstantAggregate>(C)) { // If any element in the constant vector or aggregate C is or uses a global // variable in GVMap, the constant C needs to be reconstructed, using a set // of instructions. |

