Skip to content

Commit

Permalink
Cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaraldi authored and vchuravy committed Nov 16, 2022
1 parent 717067c commit 8eff5d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
11 changes: 2 additions & 9 deletions src/llvm-demote-float16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ bool have_fp16(Function &caller) {
Attribute FSAttr = caller.getFnAttribute("target-features");
StringRef FS =
FSAttr.isValid() ? FSAttr.getValueAsString() : jl_ExecutionEngine->getTargetFeatureString();
#if defined _CPU_AARCH64_
#if defined(_CPU_AARCH64_)
if (FS.find("+fp16fml") != llvm::StringRef::npos || FS.find("+fullfp16") != llvm::StringRef::npos){
return true;
}
Expand All @@ -83,16 +83,9 @@ static bool demoteFloat16(Function &F)
{
if (have_fp16(F))
return false;

auto &ctx = F.getContext();
auto T_float32 = Type::getFloatTy(ctx);


// auto feat_string = TM->getTargetFeatureString();
//TODO: change this check to something else pending decision on
// https://github.com/JuliaLang/julia/pull/43085#discussion_r788197603
// if(feat_string.find("+fp16fml") == llvm::StringRef::npos||feat_string.find("+fullfp16") == llvm::StringRef::npos){
// return false;
// }
SmallVector<Instruction *, 0> erase;
for (auto &BB : F) {
for (auto &I : BB) {
Expand Down
1 change: 0 additions & 1 deletion src/llvm-multiversioning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ extern Optional<bool> always_have_fma(Function&);

extern Optional<bool> always_have_fp16();


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

0 comments on commit 8eff5d1

Please sign in to comment.