Skip to content

Commit c2f87bc

Browse files
Remove unused function in HexagonOptimize (#8511)
1 parent 90af423 commit c2f87bc

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/HexagonOptimize.cpp

-18
Original file line numberDiff line numberDiff line change
@@ -141,24 +141,6 @@ string type_suffix(const vector<Expr> &ops, bool signed_variants) {
141141

142142
namespace {
143143

144-
// Helper to handle various forms of multiplication.
145-
Expr as_mul(const Expr &a) {
146-
if (a.as<Mul>()) {
147-
return a;
148-
} else if (const Call *wm = Call::as_intrinsic(a, {Call::widening_mul})) {
149-
return simplify(Mul::make(cast(wm->type, wm->args[0]), cast(wm->type, wm->args[1])));
150-
} else if (const Call *s = Call::as_intrinsic(a, {Call::shift_left, Call::widening_shift_left})) {
151-
auto log2_b = as_const_uint(s->args[1]);
152-
if (log2_b) {
153-
Expr b = make_one(s->type) << cast(UInt(s->type.bits()), (int)*log2_b);
154-
return simplify(Mul::make(cast(s->type, s->args[0]), b));
155-
}
156-
} else if (const Call *wm = Call::as_intrinsic(a, {Call::widen_right_mul})) {
157-
return simplify(Mul::make(wm->args[0], cast(wm->type, wm->args[1])));
158-
}
159-
return Expr();
160-
}
161-
162144
// Helpers to generate horizontally reducing multiply operations.
163145
Expr halide_hexagon_add_2mpy(Type result_type, const string &suffix, Expr v0, Expr v1, Expr c0, Expr c1) {
164146
Expr call = Call::make(result_type, "halide.hexagon.add_2mpy" + suffix,

0 commit comments

Comments
 (0)