diff --git a/test_conformance/compiler/test_unload_platform_compiler.cpp b/test_conformance/compiler/test_unload_platform_compiler.cpp index a180a58d..039d4720 100644 --- a/test_conformance/compiler/test_unload_platform_compiler.cpp +++ b/test_conformance/compiler/test_unload_platform_compiler.cpp @@ -262,13 +262,20 @@ public: const cl_device_id device) : build_base{ context, device } { + /* Disable build_with_il if neither core nor extension functionality is + * available */ + m_enabled = false; + Version version = get_device_cl_version(device); - std::string sILVersion = get_device_il_version_string(device); - if ((version >= Version(2, 1) && version < Version(3, 0)) - || (version >= Version(3, 0) && !sILVersion.empty())) + if (version >= Version(2, 1)) { + std::string sILVersion = get_device_il_version_string(device); + if (version < Version(3, 0) || !sILVersion.empty()) + { + m_enabled = true; + } + m_CreateProgramWithIL = clCreateProgramWithIL; - m_enabled = true; } else if (is_extension_available(device, "cl_khr_il_program")) { @@ -282,12 +289,6 @@ public: } m_enabled = true; } - else - { - /* Disable build_with_il if neither core nor extension functionality - * is available */ - m_enabled = false; - } cl_uint address_bits{}; const cl_int err =