[Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623

2021-03-16 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jakub Jelinek  ---
Fixed.

[Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623

2021-03-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Segher Boessenkool :

https://gcc.gnu.org/g:a0b5843a9b2b3e93bd119d5aef583f53ad2ef0bc

commit r11-7695-ga0b5843a9b2b3e93bd119d5aef583f53ad2ef0bc
Author: Segher Boessenkool 
Date:   Tue Mar 16 18:29:11 2021 +

rs6000: Workaround for PR98092

The bcdinvalid_ RTL instruction uses the "unordered" comparison,
which cannot be used if we have -ffinite-math-only.  We really need
CCMODEs that describe what bits in a CR field are set by other insns
than just comparisons, but that is a lot more surgery, and it is stage 4
now.  This patch does a simple workaround.

2021-03-16  Segher Boessenkool  

PR target/98092
* config/rs6000/predicates.md (branch_comparison_operator): Allow
ordered and unordered for CCFPmode, if flag_finite_math_only.

gcc/testsuite/
PR target/98092
* gcc.target/powerpc/pr98092.c: New.

[Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623

2021-03-16 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

Segher Boessenkool  changed:

   What|Removed |Added

  Attachment #50040|0   |1
is obsolete||

--- Comment #6 from Segher Boessenkool  ---
Created attachment 50401
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50401=edit
Patch

[Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn) since r11-4623

2021-03-16 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[11 Regression] ICE in  |[11 Regression] ICE in
   |extract_insn, at|extract_insn, at
   |recog.c:2315 (error:|recog.c:2315 (error:
   |unrecognizable insn)|unrecognizable insn) since
   ||r11-4623

--- Comment #5 from Jakub Jelinek  ---
The builtins were added in r11-4623-g05161256d3d2a598966ca1cf676fa0e427570f73 ,
before that it has been rejected with:
pr98092.c: In function ‘h9’:
pr98092.c:4:11: warning: implicit declaration of function
‘__builtin_vec_bcdinvalid’; did you mean ‘__builtin_vec_xxeval’?
[-Wimplicit-function-declaration]
4 |   return (__builtin_vec_bcdinvalid (un));
  |   ^~~~
  |   __builtin_vec_xxeval
pr98092.c:4:3: error: AltiVec argument passed to unprototyped function
4 |   return (__builtin_vec_bcdinvalid (un));
  |   ^~

[Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)

2021-03-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

--- Comment #4 from Jakub Jelinek  ---
Any progress on this?

[Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)

2021-01-22 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

--- Comment #3 from Segher Boessenkool  ---
Created attachment 50040
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50040=edit
Patch

Patch in testing.

[Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)

2021-01-22 Thread cel at us dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

--- Comment #2 from Carl Love  ---
Segher:

Yup, I saw the buzilla.  Will take a look at it. 

  Carl 

On Fri, 2021-01-22 at 18:49 +, segher at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092 
> 
> Segher Boessenkool  changed:
> 
>What|Removed |Added
> ---
> -
>Assignee|unassigned at gcc dot gnu.org  |segher at gcc
> dot gnu.org
>

[Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)

2021-01-22 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

Jakub Jelinek  changed:

   What|Removed |Added

   Last reconfirmed||2021-01-22
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
 CC||carll at gcc dot gnu.org,
   ||jakub at gcc dot gnu.org,
   ||segher at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
The expander emits an UNORDERED comparison:
(define_expand "bcdinvalid_"
  [(parallel [(set (reg:CCFP CR6_REGNO)
   (compare:CCFP
(unspec:V2DF [(match_operand:VBCD 1 "register_operand")]
 UNSPEC_BCDADD)
(match_dup 2)))
  (clobber (match_scratch:VBCD 3))])
   (set (match_operand:SI 0 "register_operand")
(unordered:SI (reg:CCFP CR6_REGNO)
  (const_int 0)))]
  "TARGET_P8_VECTOR"
{
  operands[2] = CONST0_RTX (V2DFmode);
})
But set_cc insn will not match with -ffinite-math-only for UNORDERED,
given:
(define_predicate "scc_comparison_operator"
  (and (match_operand 0 "branch_comparison_operator")
   (match_code "eq,lt,gt,ltu,gtu,unordered")))
(define_predicate "branch_comparison_operator"
   (and (match_operand 0 "comparison_operator")
(match_test "GET_MODE_CLASS (GET_MODE (XEXP (op, 0))) == MODE_CC")
(if_then_else (match_test "GET_MODE (XEXP (op, 0)) == CCFPmode
   && !flag_finite_math_only")
  (match_code "lt,gt,eq,unordered,unge,unle,ne,ordered")
  (match_code "lt,ltu,le,leu,gt,gtu,ge,geu,eq,ne"))
(match_test "validate_condition_mode (GET_CODE (op),
  GET_MODE (XEXP (op, 0))),
 1")))
Dunno how to get out of this, perhaps for !flag_finite_math_only expand to a
different instruction that will do both the bcdadd. and mfcr and rlwinm and
just clobber the cc reg?

[Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)

2021-01-14 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1

[Bug target/98092] [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)

2020-12-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |11.0