diff mbox

[RS6000] Force source of fix_trunc<mode>si2 to reg

Message ID 20160807030851.GS20904@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra Aug. 7, 2016, 3:08 a.m. UTC
On Fri, Aug 05, 2016 at 04:25:26PM -0400, Michael Meissner wrote:
> Ummm, this patch looks wrong.  Because the insn uses the SFDF iterator, the
> mode of operands[1] could be either SFmode or DFmode.  I think it should be:
> 
> -      rtx tmp, stack;
> +      rtx src = force_reg (<MODE>mode, operands[1]);

Thanks for the correction.  I'm committing this as obvious.
    
	* config/rs6000/rs6000.md (fix_trunc<mode>si2): Fix mode of reg.
diff mbox

Patch

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 45ad661..bc01dc7 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -5357,7 +5357,7 @@ 
 {
   if (!<E500_CONVERT>)
     {
-      rtx src = force_reg (SFmode, operands[1]);
+      rtx src = force_reg (<MODE>mode, operands[1]);
 
       if (TARGET_STFIWX)
 	emit_insn (gen_fix_trunc<mode>si2_stfiwx (operands[0], src));