Skip to content

Commit 4562cfa

Browse files
authored
Fix small nits in multiversioning (#47675)
1 parent 54aa57c commit 4562cfa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/llvm-multiversioning.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void replaceUsesWithLoad(Function &F, function_ref<GlobalVariable *(Instruction
5151

5252
namespace {
5353
constexpr uint32_t clone_mask =
54-
JL_TARGET_CLONE_LOOP | JL_TARGET_CLONE_SIMD | JL_TARGET_CLONE_MATH | JL_TARGET_CLONE_CPU;
54+
JL_TARGET_CLONE_LOOP | JL_TARGET_CLONE_SIMD | JL_TARGET_CLONE_MATH | JL_TARGET_CLONE_CPU | JL_TARGET_CLONE_FLOAT16;
5555

5656
// Treat identical mapping as missing and return `def` in that case.
5757
// We mainly need this to identify cloned function using value map after LLVM cloning
@@ -498,7 +498,8 @@ uint32_t CloneCtx::collect_func_info(Function &F)
498498
// Check for BFloat16 when they are added to julia can be done here
499499
}
500500
}
501-
if (has_veccall && (flag & JL_TARGET_CLONE_SIMD) && (flag & JL_TARGET_CLONE_MATH)) {
501+
if (has_veccall && (flag & JL_TARGET_CLONE_SIMD) && (flag & JL_TARGET_CLONE_MATH) &&
502+
(flag & JL_TARGET_CLONE_CPU) && (flag & JL_TARGET_CLONE_FLOAT16)) {
502503
return flag;
503504
}
504505
}

0 commit comments

Comments
 (0)