Use llvmL1 as type for Intemediate binary type

Change-Id: I9c3c2510440c65aedf156d01ea8550d05862f14a
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2019-04-09 14:40:33 +02:00
committed by sys_ocldev
parent e201725dd5
commit a9faf0aecb
4 changed files with 24 additions and 2 deletions

View File

@@ -961,3 +961,23 @@ TEST_F(CompilerInterfaceTest, whenRequestingSipKernelBinaryThenProperInternalOpt
gEnvironment->igcPopDebugVars();
}
TEST_F(CompilerInterfaceTest, givenCompilerIntefraceWithIntermediateAndUseLlvmTextWhenBuildThenCodeTypeEqualLlvmL1) {
std::unique_ptr<MockProgram> mockProgram(new MockProgram(pProgram->peekExecutionEnvironment()));
mockProgram->setDevice(pDevice);
mockProgram->programBinaryType = CL_PROGRAM_BINARY_TYPE_INTERMEDIATE;
pCompilerInterface->useLlvmText = true;
pCompilerInterface->failCreateIgcTranslationCtx = true;
retVal = pCompilerInterface->build(*mockProgram.get(), inputArgs, false);
EXPECT_EQ(IGC::CodeType::llvmLl, pCompilerInterface->intermediateInType);
}
TEST_F(CompilerInterfaceTest, givenCompilerIntefraceWithIntermediateAndUseLlvmTextSetToFalseWhenBuildThenCodeTypeEqualllvmBc) {
std::unique_ptr<MockProgram> mockProgram(new MockProgram(pProgram->peekExecutionEnvironment()));
mockProgram->setDevice(pDevice);
mockProgram->programBinaryType = CL_PROGRAM_BINARY_TYPE_INTERMEDIATE;
pCompilerInterface->useLlvmText = false;
pCompilerInterface->failCreateIgcTranslationCtx = true;
retVal = pCompilerInterface->build(*mockProgram.get(), inputArgs, false);
EXPECT_EQ(IGC::CodeType::llvmBc, pCompilerInterface->intermediateInType);
}