> Hello. > I have already sent a patch for expanding roundeven for i386 with > relevant doubts. I also was regression testing with > make -k check > after successful bootstrap build with reverting my patches. Turns out > do-check fails without any patches applied, Is it ok to do anyways for > applied patch? Also, /contrib/compare_tests returns with "no common > files to compare" but I see all as the same files (actually, I am > moving *.sum files in manual directory and comparing with build of > applied patch.)? Is it due to failed make check?
The usual procedure is to do make check on clean tree and use contrib/test_summary to produce summary and then do the same with patched tree and compare the outputs (by diff) Honza > > Thanks, > -Tejas > > > On Wed, 19 Jun 2019 at 19:07, Tejas Joshi <tejasjoshi9...@gmail.com> wrote: > > > > Hello. > > I have made following changes to inspect inlining of roundeven with > > the following test code: > > double > > plusone (double d) > > { > > return __builtin_roundeven (d) + 1; > > } > > > > Running the program using -O2 foo.c gave internal compiler error which > > I believe is because gcc_unreachable() at: > > > > if (TARGET_SSE4_1) > > emit_insn (gen_sse4_1_round<mode>2 > > (operands[0], operands[1], GEN_INT (ROUND_<ROUNDING> > > | ROUND_NO_EXC))); > > I think the following condition matches the criterion? : > > > I think the code will be much clearer if it explicitly says > > > ROUND_ROUNDEVEN | ROUND_NO_EXC, > > > > else if (TARGET_64BIT || (<MODE>mode != DFmode)) > > { > > if (ROUND_<ROUNDING> == ROUND_FLOOR) > > ix86_expand_floorceil (operands[0], operands[1], true); > > else if (ROUND_<ROUNDING> == ROUND_CEIL) > > ix86_expand_floorceil (operands[0], operands[1], false); > > else if (ROUND_<ROUNDING> == ROUND_TRUNC) > > ix86_expand_trunc (operands[0], operands[1]); > > else > > gcc_unreachable (); > > } > > in: > > (define_expand "<rounding_insn><mode>2" > > But with -mavx, generated the vroundsd insn. Does it mean ROUNDEVEN > > should have a condition in the else if, but comments above > > ix86_expand* functions in i386-expand.c says that those are for SSE2 > > sequences? > > > > Thanks, > > --Tejas > > > > > > On Mon, 17 Jun 2019 at 22:45, Joseph Myers <jos...@codesourcery.com> wrote: > > > > > > On Mon, 17 Jun 2019, Tejas Joshi wrote: > > > > > > > > existing ROUND_NO_EXC definition in GCC. A new definition will need > > > > > adding alongside ROUND_FLOOR, ROUND_CEIL and ROUND_TRUNC to > > > > > correspond to > > > > > rounding to nearest with ties to even, evaluating to 0.) > > > > > > > > So (ROUND_ROUNDEVEN 0x0) be declared for rounding towards nearest > > > > even for rounding mode argument? But reference says that RC field > > > > should end up as 00B for rounding ties to even? I am also much > > > > > > I think the code will be much clearer if it explicitly says > > > ROUND_ROUNDEVEN | ROUND_NO_EXC, than if it hardcodes implicit knowledge > > > that 0 is the value used for rounding to nearest with ties to even. > > > > > > -- > > > Joseph S. Myers > > > jos...@codesourcery.com