rs6000: Fix absif2

Message ID 59b2ec316bbca1b6dd907247cdfcc4adf9c43b6e.1528129713.git.segher@kernel.crashing.org
State New
Headers show
Series
  • rs6000: Fix absif2
Related show

Commit Message

Segher Boessenkool June 4, 2018, 4:30 p.m.
Without this patch absif2 always FAILs.  There is no testcase for
that, nor do we see it during bootstrap, but it is obvious.

Bootstrapped and tested on powerpc64-linux {-m32,-m64}; committing
to trunk.


Segher


2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.md (abs<mode>2): Handle IFmode.

---
 gcc/config/rs6000/rs6000.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.8.3.1

Comments

Segher Boessenkool June 25, 2018, 11:44 a.m. | #1
On Mon, Jun 04, 2018 at 04:30:36PM +0000, Segher Boessenkool wrote:
> Without this patch absif2 always FAILs.  There is no testcase for

> that, nor do we see it during bootstrap, but it is obvious.

> 

> Bootstrapped and tested on powerpc64-linux {-m32,-m64}; committing

> to trunk.


Backported to 8 now.


Segher

Patch

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 01bd6ba..e082fae 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -8030,7 +8030,7 @@  (define_expand "abs<mode>2"
   label = gen_label_rtx ();
   if (<MODE>mode == TFmode)
     emit_insn (gen_abstf2_internal (operands[0], operands[1], label));
-  else if (<MODE>mode == TFmode)
+  else if (<MODE>mode == IFmode)
     emit_insn (gen_absif2_internal (operands[0], operands[1], label));
   else
     FAIL;