Skip to content

Commit

Permalink
Fix small nits in multiversioning
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaraldi authored and vchuravy committed Dec 28, 2022
1 parent 6ac5159 commit f2acf86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/llvm-multiversioning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void replaceUsesWithLoad(Function &F, function_ref<GlobalVariable *(Instruction

namespace {
constexpr uint32_t clone_mask =
JL_TARGET_CLONE_LOOP | JL_TARGET_CLONE_SIMD | JL_TARGET_CLONE_MATH | JL_TARGET_CLONE_CPU;
JL_TARGET_CLONE_LOOP | JL_TARGET_CLONE_SIMD | JL_TARGET_CLONE_MATH | JL_TARGET_CLONE_CPU | JL_TARGET_CLONE_FLOAT16;

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

0 comments on commit f2acf86

Please sign in to comment.