Message ID | b30aaf02-e1ad-3cd9-d779-53afc6269961@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
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
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" }