Skip to content

Commit

Permalink
Fix small nits in multiversioning (#47675)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaraldi authored Jan 5, 2023
1 parent 54aa57c commit 4562cfa
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 4562cfa

Please sign in to comment.