Skip to content

Commit 6702d86

Browse files
Update Halide main branch to v16 (halide#7093)
* Update Halide main branch to v16 * Drop support for LLVM13 in main Now that release/15.x has branched, main is now Halide 16 and no longer needs to support LLVM13. Update the docs, prune the requirements, eliminate old special cases we don't need anymore. * Revert mistaken changes * Update LLVM_Headers.h
1 parent 26b1f3c commit 6702d86

File tree

13 files changed

+25
-139
lines changed

13 files changed

+25
-139
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.22...3.23)
22
project(Halide
3-
VERSION 15.0.0
3+
VERSION 16.0.0
44
DESCRIPTION "Halide compiler and libraries"
55
HOMEPAGE_URL "https://halide-lang.org")
66

Makefile

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,25 +1097,9 @@ $(BUILD_DIR)/initmod.%_32_debug.ll: $(SRC_DIR)/runtime/%.cpp $(BUILD_DIR)/clang_
10971097
@mkdir -p $(@D)
10981098
$(CLANG) $(CXX_WARNING_FLAGS) -g -DDEBUG_RUNTIME -O3 $(RUNTIME_CXX_FLAGS) -fpic -m32 -target $(RUNTIME_TRIPLE_32) -DCOMPILING_HALIDE_RUNTIME -DBITS_32 -emit-llvm -S $(SRC_DIR)/runtime/$*.cpp -o $@ -MMD -MP -MF $(BUILD_DIR)/initmod.$*_32_debug.d
10991099

1100-
ifneq (,$(findstring $(LLVM_VERSION_TIMES_10), 130))
1101-
# For LLVM14+, we must add elementtype() annotations to some of our LLVM IR;
1102-
# earlier versions either don't understand that keyword at all, or don't support
1103-
# the uses we have for it. Rather than forking these sources, for now we'll just
1104-
# edit the files at build time to remove the offending uses. Note that while we could use `sed`
1105-
# here, that isn't an option for CMake builds (since they must support Windows environments without
1106-
# such tooling); to ensure consistent transformations in all builds, we'll use the tool here, too.
1107-
#
1108-
# (This may well need attention in the future, depending on how the LLVM opaque-pointers work proceeeds;
1109-
# see https://llvm.org/docs/OpaquePointers.html)
1110-
$(BUILD_DIR)/initmod.%_ll.ll: $(SRC_DIR)/runtime/%.ll $(BIN_DIR)/regexp_replace
1111-
@mkdir -p $(@D)
1112-
$(BIN_DIR)/regexp_replace 'elementtype\(i[0-9]+\)' '' < $(SRC_DIR)/runtime/$*.ll > $(BUILD_DIR)/initmod.$*_ll.ll
1113-
else
11141100
$(BUILD_DIR)/initmod.%_ll.ll: $(SRC_DIR)/runtime/%.ll
11151101
@mkdir -p $(@D)
11161102
cp $(SRC_DIR)/runtime/$*.ll $(BUILD_DIR)/initmod.$*_ll.ll
1117-
endif
1118-
11191103

11201104
$(BUILD_DIR)/initmod.%.bc: $(BUILD_DIR)/initmod.%.ll $(BUILD_DIR)/llvm_ok
11211105
$(LLVM_AS) $(BUILD_DIR)/initmod.$*.ll -o $(BUILD_DIR)/initmod.$*.bc
@@ -2222,7 +2206,7 @@ $(BUILD_DIR)/clang_ok:
22222206
@exit 1
22232207
endif
22242208

2225-
ifneq (,$(findstring $(LLVM_VERSION_TIMES_10), 130 140 150 160))
2209+
ifneq (,$(findstring $(LLVM_VERSION_TIMES_10), 140 150 160))
22262210
LLVM_OK=yes
22272211
endif
22282212

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ the repository (where this README is).
116116

117117
At any point in time, building Halide requires either the latest stable version
118118
of LLVM, the previous stable version of LLVM, and trunk. At the time of writing,
119-
this means versions 15, 14 and 13 are supported, but 12 is not. The commands
119+
this means versions 16, 15, and 14 are supported, but 13 is not. The commands
120120
`llvm-config` and `clang` must be somewhere in the path.
121121

122122
If your OS does not have packages for LLVM, you can find binaries for it at

dependencies/llvm/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
2020
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
2121
message(STATUS "Using ClangConfig.cmake in: ${Clang_DIR}")
2222

23-
if (LLVM_PACKAGE_VERSION VERSION_LESS 13.0)
24-
message(FATAL_ERROR "LLVM version must be 13.0 or newer")
23+
if (LLVM_PACKAGE_VERSION VERSION_LESS 14.0)
24+
message(FATAL_ERROR "LLVM version must be 14.0 or newer")
2525
endif ()
2626

2727
if (LLVM_PACKAGE_VERSION VERSION_GREATER 16.0)

src/CodeGen_LLVM.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,13 +1128,6 @@ void CodeGen_LLVM::optimize_module() {
11281128
llvm::CGSCCAnalysisManager cgam;
11291129
llvm::ModuleAnalysisManager mam;
11301130

1131-
#if LLVM_VERSION < 140
1132-
// If building against LLVM older than 14, explicitly specify AA pipeline.
1133-
// Not needed with LLVM14 or later, already the default.
1134-
llvm::AAManager aa = pb.buildDefaultAAPipeline();
1135-
fam.registerPass([&] { return std::move(aa); });
1136-
#endif
1137-
11381131
// Register all the basic analyses with the managers.
11391132
pb.registerModuleAnalyses(mam);
11401133
pb.registerCGSCCAnalyses(cgam);
@@ -1143,12 +1136,7 @@ void CodeGen_LLVM::optimize_module() {
11431136
pb.crossRegisterProxies(lam, fam, cgam, mam);
11441137
ModulePassManager mpm;
11451138

1146-
#if LLVM_VERSION >= 140
11471139
using OptimizationLevel = llvm::OptimizationLevel;
1148-
#else
1149-
using OptimizationLevel = PassBuilder::OptimizationLevel;
1150-
#endif
1151-
11521140
OptimizationLevel level = OptimizationLevel::O3;
11531141

11541142
if (get_target().has_feature(Target::SanitizerCoverage)) {
@@ -1183,7 +1171,6 @@ void CodeGen_LLVM::optimize_module() {
11831171
});
11841172
#endif
11851173
pb.registerPipelineStartEPCallback([](ModulePassManager &mpm, OptimizationLevel) {
1186-
#if LLVM_VERSION >= 140
11871174
AddressSanitizerOptions asan_options; // default values are good...
11881175
asan_options.UseAfterScope = true; // ...except this one
11891176
constexpr bool use_global_gc = false;
@@ -1195,14 +1182,6 @@ void CodeGen_LLVM::optimize_module() {
11951182
#else
11961183
mpm.addPass(ModuleAddressSanitizerPass(
11971184
asan_options, use_global_gc, use_odr_indicator, destructor_kind));
1198-
#endif
1199-
#else
1200-
constexpr bool compile_kernel = false;
1201-
constexpr bool recover = false;
1202-
constexpr bool module_use_global_gc = false;
1203-
constexpr bool use_odr_indicator = true;
1204-
mpm.addPass(ModuleAddressSanitizerPass(
1205-
compile_kernel, recover, module_use_global_gc, use_odr_indicator));
12061185
#endif
12071186
});
12081187
}

src/CodeGen_PTX_Dev.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -700,12 +700,7 @@ vector<char> CodeGen_PTX_Dev::compile_to_src() {
700700
pb.crossRegisterProxies(lam, fam, cgam, mam);
701701
ModulePassManager mpm;
702702

703-
#if LLVM_VERSION >= 140
704703
using OptimizationLevel = llvm::OptimizationLevel;
705-
#else
706-
using OptimizationLevel = PassBuilder::OptimizationLevel;
707-
#endif
708-
709704
OptimizationLevel level = OptimizationLevel::O3;
710705

711706
target_machine->registerPassBuilderCallbacks(pb);

src/CodeGen_WebAssembly.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ const WasmIntrinsic intrinsic_defs[] = {
7171
{"llvm.wasm.avgr.unsigned.v16i8", UInt(8, 16), "rounding_halving_add", {UInt(8, 16), UInt(8, 16)}, Target::WasmSimd128},
7272
{"llvm.wasm.avgr.unsigned.v8i16", UInt(16, 8), "rounding_halving_add", {UInt(16, 8), UInt(16, 8)}, Target::WasmSimd128},
7373

74-
#if LLVM_VERSION == 130
75-
{"float_to_double", Float(64, 4), "float_to_double", {Float(32, 4)}, Target::WasmSimd128},
76-
#endif
77-
7874
// With some work, some of these could possibly be adapted to work under earlier versions of LLVM.
7975
{"widening_mul_i8x16", Int(16, 16), "widening_mul", {Int(8, 16), Int(8, 16)}, Target::WasmSimd128},
8076
{"widening_mul_i16x8", Int(32, 8), "widening_mul", {Int(16, 8), Int(16, 8)}, Target::WasmSimd128},
@@ -155,9 +151,6 @@ void CodeGen_WebAssembly::visit(const Cast *op) {
155151
static const Pattern patterns[] = {
156152
{"int_to_double", f64(wild_i32x_), Target::WasmSimd128},
157153
{"int_to_double", f64(wild_u32x_), Target::WasmSimd128},
158-
#if LLVM_VERSION == 130
159-
{"float_to_double", f64(wild_f32x_), Target::WasmSimd128},
160-
#endif
161154
{"widen_integer", i16(wild_i8x_), Target::WasmSimd128},
162155
{"widen_integer", u16(wild_u8x_), Target::WasmSimd128},
163156
{"widen_integer", i32(wild_i16x_), Target::WasmSimd128},

src/LLVM_Headers.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef HALIDE_LLVM_HEADERS_H
22
#define HALIDE_LLVM_HEADERS_H
33

4-
#if LLVM_VERSION >= 130
4+
#if LLVM_VERSION >= 140
55
// We're good to go
66
#else
7-
#error "Compiling Halide requires LLVM 13.0 or newer"
7+
#error "Compiling Halide requires LLVM 14.0 or newer"
88
#endif
99

1010
// No msvc warnings from llvm headers please
@@ -62,6 +62,7 @@
6262
#include <llvm/IR/Verifier.h>
6363
#include <llvm/Linker/Linker.h>
6464
#include <llvm/MC/MCTargetOptions.h>
65+
#include <llvm/MC/TargetRegistry.h>
6566
#include <llvm/Object/ArchiveWriter.h>
6667
#include <llvm/Object/ObjectFile.h>
6768
#include <llvm/Passes/PassBuilder.h>
@@ -73,11 +74,6 @@
7374
#include <llvm/Support/ErrorHandling.h>
7475
#include <llvm/Support/FileSystem.h>
7576
#include <llvm/Support/FormattedStream.h>
76-
#if LLVM_VERSION >= 140
77-
#include <llvm/MC/TargetRegistry.h>
78-
#else
79-
#include <llvm/Support/TargetRegistry.h>
80-
#endif
8177
#include <llvm/Support/TargetSelect.h>
8278
#include <llvm/Support/TypeSize.h>
8379
#include <llvm/Support/raw_os_ostream.h>

src/LLVM_Runtime_Linker.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -294,20 +294,12 @@ llvm::DataLayout get_data_layout_for_target(Target target) {
294294
} else if (target.os == Target::IOS) {
295295
return llvm::DataLayout("e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:128-n8:16:32-S128");
296296
} else if (target.os == Target::Windows) {
297-
#if LLVM_VERSION >= 140
298297
// For 32-bit MSVC targets, alignment of f80 values is 16 bytes (see https://reviews.llvm.org/D115942)
299298
if (!target.has_feature(Target::JIT)) {
300299
return llvm::DataLayout("e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32-a:0:32-S32");
301300
} else {
302301
return llvm::DataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32-a:0:32-S32");
303302
}
304-
#else
305-
if (!target.has_feature(Target::JIT)) {
306-
return llvm::DataLayout("e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32");
307-
} else {
308-
return llvm::DataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32");
309-
}
310-
#endif
311303
} else {
312304
// Linux/Android
313305
return llvm::DataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128");
@@ -360,19 +352,11 @@ llvm::DataLayout get_data_layout_for_target(Target target) {
360352
"e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8"
361353
"-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048");
362354
} else if (target.arch == Target::WebAssembly) {
363-
#if LLVM_VERSION >= 140
364355
if (target.bits == 32) {
365356
return llvm::DataLayout("e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20");
366357
} else {
367358
return llvm::DataLayout("e-m:e-p:64:64-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20");
368359
}
369-
#else
370-
if (target.bits == 32) {
371-
return llvm::DataLayout("e-m:e-p:32:32-i64:64-n32:64-S128");
372-
} else {
373-
return llvm::DataLayout("e-m:e-p:64:64-i64:64-n32:64-S128");
374-
}
375-
#endif
376360
} else if (target.arch == Target::RISCV) {
377361
// TODO: Valdidate this data layout is correct for RISCV. Assumption is it is like MIPS.
378362
if (target.bits == 32) {

src/WasmExecutor.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -360,17 +360,10 @@ std::vector<char> compile_to_wasm(const Module &module, const std::string &fn_na
360360
// Note that we must restore it before using internal_error (and also on the non-error path).
361361
auto old_abort_handler = std::signal(SIGABRT, SIG_DFL);
362362

363-
#if LLVM_VERSION >= 140
364363
if (!lld::wasm::link(lld_args, llvm::outs(), llvm::errs(), /*canExitEarly*/ false, /*disableOutput*/ false)) {
365364
std::signal(SIGABRT, old_abort_handler);
366365
internal_error << "lld::wasm::link failed\n";
367366
}
368-
#else
369-
if (!lld::wasm::link(lld_args, /*CanExitEarly*/ false, llvm::outs(), llvm::errs())) {
370-
std::signal(SIGABRT, old_abort_handler);
371-
internal_error << "lld::wasm::link failed\n";
372-
}
373-
#endif
374367

375368
std::signal(SIGABRT, old_abort_handler);
376369

src/runtime/CMakeLists.txt

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -270,28 +270,11 @@ foreach (i IN LISTS RUNTIME_LL)
270270
set(BC "initmod.${i}.bc")
271271
set(INITMOD "_initmod_${i}.cpp")
272272

273-
# For LLVM14+, we must add elementtype() annotations to some of our LLVM IR;
274-
# earlier versions either don't understand that keyword at all, or don't support
275-
# the uses we have for it. Rather than forking these sources, for now we'll just
276-
# edit the files at build time to remove the offending uses. Note that `sed` and friends aren't
277-
# an option for CMake builds (since they must support Windows environments without
278-
# such tooling).
279-
#
280-
# (This may well need attention in the future, depending on how the LLVM opaque-pointers work proceeeds;
281-
# see https://llvm.org/docs/OpaquePointers.html)
282-
283273
set(LL_TRANSFORMED "${LL}.transformed.ll")
284-
if (LLVM_PACKAGE_VERSION VERSION_LESS 14.0.0)
285-
add_custom_command(OUTPUT "${LL_TRANSFORMED}"
286-
COMMAND regexp_replace "elementtype\\(i[0-9]+\\)" "" < "$<SHELL_PATH:${CMAKE_CURRENT_SOURCE_DIR}/${LL}>" > "${LL_TRANSFORMED}"
287-
DEPENDS "${LL}" regexp_replace
288-
VERBATIM)
289-
else ()
290-
add_custom_command(OUTPUT "${LL_TRANSFORMED}"
291-
COMMAND ${CMAKE_COMMAND} -E copy "$<SHELL_PATH:${CMAKE_CURRENT_SOURCE_DIR}/${LL}>" "${LL_TRANSFORMED}"
292-
DEPENDS "${LL}"
293-
VERBATIM)
294-
endif ()
274+
add_custom_command(OUTPUT "${LL_TRANSFORMED}"
275+
COMMAND ${CMAKE_COMMAND} -E copy "$<SHELL_PATH:${CMAKE_CURRENT_SOURCE_DIR}/${LL}>" "${LL_TRANSFORMED}"
276+
DEPENDS "${LL}"
277+
VERBATIM)
295278

296279
add_custom_command(OUTPUT "${BC}"
297280
COMMAND llvm-as "${LL_TRANSFORMED}" -o "${BC}"

src/runtime/wasm_math.ll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,6 @@ define weak_odr <8 x i16> @saturating_narrow_i32x8_to_u16x8(<8 x i32> %x) nounwi
234234
ret <8 x i16> %3
235235
}
236236

237-
; single to double-precision floating point (only needed for LLVM_VERSION == 13)
238-
define weak_odr <4 x double> @float_to_double(<4 x float> %x) nounwind alwaysinline {
239-
%1 = fpext <4 x float> %x to <4 x double>
240-
ret <4 x double> %1
241-
}
242-
243237
; Integer to integer extension
244238

245239
; i8 -> i16

test/correctness/simd_op_check.cpp

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ class SimdOpCheck : public SimdOpCheckTest {
996996
check(arm32 ? "vmovl.u32" : "ushll", 2 * w, i64(u32_1));
997997

998998
// VMOVN I - Move and Narrow
999-
if (Halide::Internal::get_llvm_version() >= 140 && w > 1) {
999+
if (w > 1) {
10001000
check(arm32 ? "vmovn.i16" : "uzp1", 8 * w, i8(i16_1));
10011001
check(arm32 ? "vmovn.i16" : "uzp1", 8 * w, u8(u16_1));
10021002
check(arm32 ? "vmovn.i32" : "uzp1", 4 * w, i16(i32_1));
@@ -1389,23 +1389,14 @@ class SimdOpCheck : public SimdOpCheckTest {
13891389
check(arm32 ? "vrshr.u32" : "urshr", 4 * w, u32((u64(u32_1) + 32) >> 6));
13901390

13911391
// VRSHRN I - Rounding Shift Right Narrow
1392-
if (Halide::Internal::get_llvm_version() >= 140) {
1393-
// LLVM14 converts RSHRN/RSHRN2 to RADDHN/RADDHN2 when the shift amount is half the width of the vector element
1394-
// See https://reviews.llvm.org/D116166
1395-
check(arm32 ? "vrshrn.i16" : "raddhn", 8 * w, i8((i32(i16_1) + 128) >> 8));
1396-
check(arm32 ? "vrshrn.i32" : "rshrn", 4 * w, i16((i32_1 + 256) >> 9));
1397-
check(arm32 ? "vrshrn.i64" : "rshrn", 2 * w, i32((i64_1 + 8) >> 4));
1398-
check(arm32 ? "vrshrn.i16" : "raddhn", 8 * w, u8((u32(u16_1) + 128) >> 8));
1399-
check(arm32 ? "vrshrn.i32" : "rshrn", 4 * w, u16((u64(u32_1) + 1024) >> 11));
1400-
// check(arm32 ? "vrshrn.i64" : "raddhn", 2 * w, u32((u64_1 + 64) >> 7));
1401-
} else {
1402-
check(arm32 ? "vrshrn.i16" : "rshrn", 8 * w, i8((i32(i16_1) + 128) >> 8));
1403-
check(arm32 ? "vrshrn.i32" : "rshrn", 4 * w, i16((i32_1 + 256) >> 9));
1404-
check(arm32 ? "vrshrn.i64" : "rshrn", 2 * w, i32((i64_1 + 8) >> 4));
1405-
check(arm32 ? "vrshrn.i16" : "rshrn", 8 * w, u8((u32(u16_1) + 128) >> 8));
1406-
check(arm32 ? "vrshrn.i32" : "rshrn", 4 * w, u16((u64(u32_1) + 1024) >> 11));
1407-
// check(arm32 ? "vrshrn.i64" : "rshrn", 2 * w, u32((u64_1 + 64) >> 7));
1408-
}
1392+
// LLVM14 converts RSHRN/RSHRN2 to RADDHN/RADDHN2 when the shift amount is half the width of the vector element
1393+
// See https://reviews.llvm.org/D116166
1394+
check(arm32 ? "vrshrn.i16" : "raddhn", 8 * w, i8((i32(i16_1) + 128) >> 8));
1395+
check(arm32 ? "vrshrn.i32" : "rshrn", 4 * w, i16((i32_1 + 256) >> 9));
1396+
check(arm32 ? "vrshrn.i64" : "rshrn", 2 * w, i32((i64_1 + 8) >> 4));
1397+
check(arm32 ? "vrshrn.i16" : "raddhn", 8 * w, u8((u32(u16_1) + 128) >> 8));
1398+
check(arm32 ? "vrshrn.i32" : "rshrn", 4 * w, u16((u64(u32_1) + 1024) >> 11));
1399+
// check(arm32 ? "vrshrn.i64" : "raddhn", 2 * w, u32((u64_1 + 64) >> 7));
14091400

14101401
// VRSQRTE I, F - Reciprocal Square Root Estimate
14111402
check(arm32 ? "vrsqrte.f32" : "frsqrte", 4 * w, fast_inverse_sqrt(f32_1));
@@ -2223,10 +2214,8 @@ class SimdOpCheck : public SimdOpCheckTest {
22232214
check("f32x4.convert_i32x4_u", 8 * w, cast<float>(u32_1));
22242215

22252216
// Integer to double-precision floating point
2226-
if (Halide::Internal::get_llvm_version() >= 140) {
2227-
check("f64x2.convert_low_i32x4_s", 2 * w, cast<double>(i32_1));
2228-
check("f64x2.convert_low_i32x4_u", 2 * w, cast<double>(u32_1));
2229-
}
2217+
check("f64x2.convert_low_i32x4_s", 2 * w, cast<double>(i32_1));
2218+
check("f64x2.convert_low_i32x4_u", 2 * w, cast<double>(u32_1));
22302219

22312220
// Single-precision floating point to integer with saturation
22322221
check("i32x4.trunc_sat_f32x4_s", 4 * w, cast<int32_t>(f32_1));
@@ -2242,12 +2231,8 @@ class SimdOpCheck : public SimdOpCheckTest {
22422231
// check("f32x4.demote_f64x2_zero", 4 * w, ???);
22432232

22442233
// Single-precision floating point to double-precision
2245-
if (Halide::Internal::get_llvm_version() >= 140) {
2246-
// TODO(https://github.com/halide/Halide/issues/5130): broken for > 128bit vector widths
2247-
if (w < 2) {
2248-
check("f64x2.promote_low_f32x4", 2 * w, cast<double>(f32_1));
2249-
}
2250-
} else {
2234+
// TODO(https://github.com/halide/Halide/issues/5130): broken for > 128bit vector widths
2235+
if (w < 2) {
22512236
check("f64x2.promote_low_f32x4", 2 * w, cast<double>(f32_1));
22522237
}
22532238

0 commit comments

Comments
 (0)