This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH rs6000] Fix PR target/80107, ICE in final_scan_insn
- From: Pat Haugen <pthaugen at linux dot vnet dot ibm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Segher Boessenkool <segher at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Fri, 31 Mar 2017 10:25:00 -0500
- Subject: [PATCH rs6000] Fix PR target/80107, ICE in final_scan_insn
- Authentication-results: sourceware.org; auth=none
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" }