From: Alexander Monakov Date: Fri, 10 Aug 2018 10:13:37 +0000 (+0300) Subject: i386: do not use SImode mul-highpart on 64-bit (PR 82418) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f80d6a178ed2043c6a9a4d8076cdc72d61b67b2b;p=gcc.git i386: do not use SImode mul-highpart on 64-bit (PR 82418) PR target/82418 * config/i386/i386.md (mul3_highpart): Use DWIH mode iterator instead of SWI48. testsuite/ * gcc.target/i386/pr82418.c: New test. From-SVN: r263467 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 28e44cf455d..710d164ba88 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-08-10 Alexander Monakov + + PR target/82418 + * config/i386/i386.md (mul3_highpart): Use DWIH mode iterator + instead of SWI48. + 2018-08-10 Martin Liska PR target/83610 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 73948c12618..10783d305d2 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -7792,16 +7792,16 @@ (set_attr "mode" "QI")]) (define_expand "mul3_highpart" - [(parallel [(set (match_operand:SWI48 0 "register_operand") - (truncate:SWI48 + [(parallel [(set (match_operand:DWIH 0 "register_operand") + (truncate:DWIH (lshiftrt: (mult: (any_extend: - (match_operand:SWI48 1 "nonimmediate_operand")) + (match_operand:DWIH 1 "nonimmediate_operand")) (any_extend: - (match_operand:SWI48 2 "register_operand"))) + (match_operand:DWIH 2 "register_operand"))) (match_dup 3)))) - (clobber (match_scratch:SWI48 4)) + (clobber (match_scratch:DWIH 4)) (clobber (reg:CC FLAGS_REG))])] "" "operands[3] = GEN_INT (GET_MODE_BITSIZE (mode));") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index af9e9c17aa4..174137ee086 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-08-10 Alexander Monakov + + PR target/82418 + * gcc.target/i386/pr82418.c: New test. + 2018-08-10 Martin Liska PR target/83610 diff --git a/gcc/testsuite/gcc.target/i386/pr82418.c b/gcc/testsuite/gcc.target/i386/pr82418.c new file mode 100644 index 00000000000..95a506d5ccd --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr82418.c @@ -0,0 +1,10 @@ +/* PR target/82418 */ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler "imul\[^\n\r]*1374389535" } } */ + +unsigned +f1(unsigned x) +{ + return x / 100; +}