Skip to content

Commit ac93a93

Browse files
vmustyaigcbot
authored andcommitted
Remove redundant option from a VC ocloc test
.
1 parent 76c7312 commit ac93a93

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXRegionCollapsing.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ static Value *createBitCastToElementType(Value *Input, Type *ElementTy,
342342
const DebugLoc &DbgLoc) {
343343
unsigned ElBytes = vc::getTypeSize(ElementTy, &DL).inBytes();
344344
unsigned InputBytes = vc::getTypeSize(Input->getType(), &DL).inBytes();
345-
IGC_ASSERT_MESSAGE(!(InputBytes & (ElBytes - 1)),
346-
"non-integral number of elements");
345+
if (InputBytes % ElBytes != 0)
346+
return nullptr;
347347
auto Ty = IGCLLVM::FixedVectorType::get(ElementTy, InputBytes / ElBytes);
348348
return createBitCast(Input, Ty, Name, InsertBefore, DbgLoc);
349349
}
@@ -645,11 +645,15 @@ void GenXRegionCollapsing::processRdRegion(Instruction *InnerRd) {
645645
OuterRd->getOperand(GenXIntrinsic::GenXRegion::OldValueOperandNum);
646646
// InnerR.ElementTy not always equal to InnerRd->getType()->getScalarType()
647647
// (look above)
648-
if (InnerR.ElementTy != OuterRd->getType()->getScalarType())
648+
if (InnerR.ElementTy != OuterRd->getType()->getScalarType()) {
649649
Input = createBitCastToElementType(Input, InnerR.ElementTy,
650650
Input->getName() +
651651
".bitcast_before_collapse",
652652
OuterRd, *DL, OuterRd->getDebugLoc());
653+
if (!Input)
654+
return;
655+
}
656+
653657
// Create the combined rdregion.
654658
Instruction *CombinedRd = CombinedR.createRdRegion(
655659
Input, InnerRd->getName() + ".regioncollapsed", InnerRd,

IGC/ocloc_tests/VC/DetectPointerArg/struct-ptr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
; REQUIRES: regkeys, pvc-supported
1010
; RUN: llvm-as %s -o %t.bc
11-
; RUN: ocloc -device pvc -llvm_input -options "-vc-codegen -ze-collect-cost-info -igc_opts 'ShaderDumpEnable=1, DumpToCustomDir=%t'" -output_no_suffix -file %t.bc
11+
; RUN: ocloc -device pvc -llvm_input -options "-vc-codegen -igc_opts 'ShaderDumpEnable=1, DumpToCustomDir=%t'" -output_no_suffix -file %t.bc
1212
; RUN: cat %t/*.zeinfo | FileCheck %s
1313

1414
target datalayout = "e-p:64:64-i64:64-n8:16:32:64"

visa/BinaryEncodingIGA.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,8 +1743,8 @@ void *BinaryEncodingIGA::EmitBinary(size_t &binarySize) {
17431743
std::string errStr;
17441744
errStr = "BinaryEncodingIGA: unable to open output path for write: " +
17451745
binFileName + "\n";
1746-
vISA_ASSERT(false, errStr);
1747-
return nullptr;
1746+
// vISA_ASSERT(false, errStr);
1747+
return m_kernelBuffer;
17481748
}
17491749
os.write((const char *)m_kernelBuffer, binarySize);
17501750
}

0 commit comments

Comments
 (0)