Index: gcc/testsuite/gcc.c-torture/compile/pr29945.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr29945.c (revision 0) +++ gcc/testsuite/gcc.c-torture/compile/pr29945.c (revision 0) @@ -0,0 +1,8 @@ +/* This test used to ICE on the SPU target. */ +extern const char *__ctype_ptr; + +parse_real (unsigned char c) +{ + if ((__ctype_ptr[c]&04) && c != '.') + unget_char ( c); +} Index: gcc/config/spu/spu.md =================================================================== --- gcc/config/spu/spu.md (revision 119333) +++ gcc/config/spu/spu.md (working copy) @@ -2708,9 +2708,18 @@ (define_expand "movcc" ;; This pattern is used when the result of a compare is not large ;; enough to use in a selb when expanding conditional moves. -(define_insn "extend_compare" +(define_expand "extend_compare" [(set (match_operand 0 "spu_reg_operand" "=r") (unspec [(match_operand 1 "spu_reg_operand" "r")] UNSPEC_EXTEND_CMP))] + "" + { + emit_insn (gen_rtx_SET (VOIDmode, operands[0], gen_rtx_UNSPEC (GET_MODE (operands[0]), + gen_rtvec (1, operands[1]), UNSPEC_EXTEND_CMP))); + DONE; + }) +(define_insn "extend_compare" + [(set (match_operand:ALL 0 "spu_reg_operand" "=r") + (unspec:ALL [(match_operand 1 "spu_reg_operand" "r")] UNSPEC_EXTEND_CMP))] "operands" "fsm\t%0,%1" [(set_attr "type" "shuf")])