From 9061e4cdc9c63ff6f57f60bf8df585c14526bb89 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 19 Nov 1993 18:36:25 -0500 Subject: [PATCH] (expand_complex_abs): Replace some erroneous uses of MODE with SUBMODE. From-SVN: r6118 --- gcc/optabs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/optabs.c b/gcc/optabs.c index de0098bdefb..6a5a5843983 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2030,12 +2030,15 @@ expand_complex_abs (mode, op0, target, unsignedp) real = gen_realpart (submode, op0); imag = gen_imagpart (submode, op0); + /* Square both parts. */ - real = expand_mult (mode, real, real, NULL_RTX, 0); - imag = expand_mult (mode, imag, imag, NULL_RTX, 0); + real = expand_mult (submode, real, real, NULL_RTX, 0); + imag = expand_mult (submode, imag, imag, NULL_RTX, 0); + /* Sum the parts. */ total = expand_binop (submode, add_optab, real, imag, 0, 0, OPTAB_LIB_WIDEN); + /* Get sqrt in TARGET. Set TARGET to where the result is. */ target = expand_unop (submode, sqrt_optab, total, target, 0); if (target == 0) -- 2.30.2