On Wed, Dec 11, 2019 at 4:24 AM 玩还有 <wwwhhhyyy...@gmail.com> wrote: > > Hi: > Currently smax/smin pattern added by r274481 cause some regression > in 525.x264_r by 8% with -O2 -march=corei7. The reason is some IA > backends (contain TARGET_SSE4_1) will do transform for simple abs > (using rshift, xor and sub) to pmax/pmin if smax/smin pattern exists, > which generate unnecessary sse instruction. This patch adds abs > patterns to generate simple abs for integer mode to recover the > regression. > > Bootstrap ok, regression test on i386 backend is ok. > Ok for trunk? > > Changelog > gcc/ > PR target/92651 > * config/i386/i386.h (TARGET_USE_SIMPLE_ABS_PATTERN): New macro. > * config/i386/x86-tune.def (X86_TUNE_USE_SIMPLE_ABS_PATTERN): New > * config/i386/i386.md (abs<SWI48x>2): New define_expand. > > gcc/testsuite > * gcc.target/i386/pr92651.c: New testcase.
OK, but please name new macro TARGET_EXPAND_ABS and corresponding tune X86_TUNE_EXPAND_ABS. Thanks, Uros. > Regards, > Hongyu, Wang