diff --git a/llvm_util/utils.cpp b/llvm_util/utils.cpp index a359edea0..cbb74c093 100644 --- a/llvm_util/utils.cpp +++ b/llvm_util/utils.cpp @@ -287,31 +287,6 @@ Value* get_operand(llvm::Value *v, if (!ty) return nullptr; - // automatic splat of constant values - if (auto vty = dyn_cast(v->getType()); - vty && isa(v)) { - llvm::Value *llvm_splat = nullptr; - if (auto cnst = dyn_cast(v)) { - llvm_splat - = llvm::ConstantInt::get(vty->getElementType(), cnst->getValue()); - } else if (auto cnst = dyn_cast(v)) { - llvm_splat - = llvm::ConstantFP::get(vty->getElementType(), cnst->getValue()); - } else - UNREACHABLE(); - - auto splat = get_operand(llvm_splat, constexpr_conv, copy_inserter, - register_fn_decl); - if (!splat) - return nullptr; - - vector vals(vty->getNumElements(), splat); - auto val = make_unique(*ty, std::move(vals)); - auto ret = val.get(); - current_fn->addConstant(std::move(val)); - RETURN_CACHE(ret); - } - if (auto cnst = dyn_cast(v)) { RETURN_CACHE(make_intconst(cnst->getValue())); }