* [PATCH rs6000] Fix PR target/80107, ICE in final_scan_insn
@ 2017-03-31 15:27 Pat Haugen
2017-03-31 15:38 ` Segher Boessenkool
0 siblings, 1 reply; 2+ messages in thread
From: Pat Haugen @ 2017-03-31 15:27 UTC (permalink / raw)
To: GCC Patches; +Cc: Segher Boessenkool, David Edelsohn
float<QHI:mode><FP_ISA3:mode>2_internal uses gen_extendhidi2 on a VSX
register but extendhidi2 only supports GPRs if -mno-gen-cell-microcode
is in effect. Fixed by adding a check of TARGET_VSX_SMALL_INTEGER.
Bootstrap/regtest on powerpc64le-linux with no regressions, ok for
trunk? The -mvsx-small-integer option/code was introduced in GCC 7 so no
need for backport.
-Pat
2017-03-31 Pat Haugen <pthaugen@us.ibm.com>
PR target/80107
* config/rs6000/rs6000.md (extendhi<mode>2): Add test for
TARGET_VSX_SMALL_INTEGER.
testsuite/ChangeLog:
2017-03-31 Pat Haugen <pthaugen@us.ibm.com>
* gfortran.dg/pr80107.f: New.
Index: config/rs6000/rs6000.md
===================================================================
--- config/rs6000/rs6000.md (revision 246534)
+++ config/rs6000/rs6000.md (working copy)
@@ -954,7 +954,7 @@ (define_expand "extendhi<mode>2"
(define_insn "*extendhi<mode>2"
[(set (match_operand:EXTHI 0 "gpc_reg_operand" "=r,r,?*wK,?*wK")
(sign_extend:EXTHI (match_operand:HI 1 "reg_or_mem_operand" "m,r,Z,wK")))]
- "rs6000_gen_cell_microcode"
+ "rs6000_gen_cell_microcode || TARGET_VSX_SMALL_INTEGER"
"@
lha%U1%X1 %0,%1
extsh %0,%1
Index: testsuite/gfortran.dg/pr80107.f
===================================================================
--- testsuite/gfortran.dg/pr80107.f (nonexistent)
+++ testsuite/gfortran.dg/pr80107.f (working copy)
@@ -0,0 +1,7 @@
+! { dg-do compile { target { powerpc*-*-* } } }
+! { dg-options "-O0 -mpower9-dform-vector -mno-gen-cell-microcode" }
+
+ integer(kind=2) j, j2, ja
+ call c_c(CMPLX(j),(1.,0.),'CMPLX(integer(2))')
+ end
+! { dg-prune-output "-mno-gen-cell-microcode requires -mcpu=cell" }
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH rs6000] Fix PR target/80107, ICE in final_scan_insn
2017-03-31 15:27 [PATCH rs6000] Fix PR target/80107, ICE in final_scan_insn Pat Haugen
@ 2017-03-31 15:38 ` Segher Boessenkool
0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2017-03-31 15:38 UTC (permalink / raw)
To: Pat Haugen; +Cc: GCC Patches, David Edelsohn
On Fri, Mar 31, 2017 at 10:25:00AM -0500, Pat Haugen wrote:
> float<QHI:mode><FP_ISA3:mode>2_internal uses gen_extendhidi2 on a VSX
> register but extendhidi2 only supports GPRs if -mno-gen-cell-microcode
> is in effect. Fixed by adding a check of TARGET_VSX_SMALL_INTEGER.
Yuck :-)
> Bootstrap/regtest on powerpc64le-linux with no regressions, ok for
> trunk? The -mvsx-small-integer option/code was introduced in GCC 7 so no
> need for backport.
With this line removed:
> +! { dg-prune-output "-mno-gen-cell-microcode requires -mcpu=cell" }
Okay, thanks!
Segher
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-31 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 15:27 [PATCH rs6000] Fix PR target/80107, ICE in final_scan_insn Pat Haugen
2017-03-31 15:38 ` Segher Boessenkool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).