Fix spe.md movv4hi_internal
Joseph S. Myers
joseph@codesourcery.com
Fri Nov 17 22:50:00 GMT 2006
This patch fixes ICEs on gcc.c-torture/execute/20050604-1.c on
powerpc-none-linux-gnuspe --enable-e500_double, all levels apart from -O0,
by adding an alternative for loading easy vector constants (which here
means just 0) to movv4hi_internal, like that in movv2si_internal,
movv1di_internal and movv2sf_internal.
Tested with no regressions, crosses to powerpc-none-linux-gnuspe. OK to
commit to mainline, 4.2 and 4.1?
Note: there's also an execution failure of this test at -O0 only, both
before and after this patch, which would appear to be a separate bug.
After this patch all the higher optimization levels (which previously had
an ICE) pass the execution test.
2006-11-17 Joseph Myers <joseph@codesourcery.com>
* config/rs6000/spe.md (movv4hi_internal): Add alternative for
easy vector constant loads.
Index: spe.md
===================================================================
--- spe.md (revision 118940)
+++ spe.md (working copy)
@@ -2392,15 +2392,16 @@
"{ rs6000_emit_move (operands[0], operands[1], V4HImode); DONE; }")
(define_insn "*movv4hi_internal"
- [(set (match_operand:V4HI 0 "nonimmediate_operand" "=m,r,r")
- (match_operand:V4HI 1 "input_operand" "r,m,r"))]
+ [(set (match_operand:V4HI 0 "nonimmediate_operand" "=m,r,r,r")
+ (match_operand:V4HI 1 "input_operand" "r,m,r,W"))]
"TARGET_SPE
&& (gpc_reg_operand (operands[0], V4HImode)
|| gpc_reg_operand (operands[1], V4HImode))"
"@
evstdd%X0 %1,%y0
evldd%X1 %0,%y1
- evor %0,%1,%1"
+ evor %0,%1,%1
+ evxor %0,%0,%0"
[(set_attr "type" "vecload")])
(define_expand "movv2sf"
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list