On Tue, May 29, 2018 at 11:38 AM, Uros Bizjak <ubiz...@gmail.com> wrote: > Hello! > > Attached patch enables l<rounding_insn><MODEF:mode><SWI48:mode>2 for > TARGET_SSE4.1, and while there, also corrects operand 1 predicate of > rounds{s,d} instruction. > > 2018-05-29 Uros Bizjak <ubiz...@gmail.com> > > PR target/85950 > * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2): > Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q} > sequence. > (sse4_1_round<mode>2): Use nonimmediate_operand > for operand 1 predicate. > > testsuite/ChangeLog: > > 2018-05-29 Uros Bizjak <ubiz...@gmail.com> > > PR target/85950 > * gcc.target/i386/pr85950.c: New test. > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > > Committed to mainline SVN. >
The testcase needs -mno-avx512f. Otherwise -march=native on AVX512 machine will generate vrndscalesd $9, %xmm0, %xmm0, %xmm0 vcvttsd2siq %xmm0, %rax instead of vroundsd $9, %xmm0, %xmm0, %xmm0 vcvttsd2siq %xmm0, %rax -- H.J.