x86: Add a testcase for PR target/31799
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 17 Nov 2020 14:01:41 +0000 (06:01 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 17 Nov 2020 14:01:41 +0000 (06:01 -0800)
commit7f87b4ef2323769bd71f7ccea2aa6017a7376f76
tree151b5c2c0b2ee4665cb43478bc8a283cebb0347a
parent0f6759240f1df4240483d0ac3744ac60e82e702f
x86: Add a testcase for PR target/31799

Add a testcase for PR target/31799 which was fixed by

commit 4f0473fe89e68bf7c09542ee5c3684da25a5b435
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Fri May 12 21:04:05 2017 +0200

    compare-elim.c (try_eliminate_compare): Canonicalize operation with embedded compare to [(set (reg:CCM) (compare:CCM...

            * compare-elim.c (try_eliminate_compare): Canonicalize
            operation with embedded compare to
            [(set (reg:CCM) (compare:CCM (operation) (immediate)))
             (set (reg) (operation)].

            * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.

in GCC 8.

PR target/31799
* gcc.target/i386/pr31799.c: New test.
gcc/testsuite/gcc.target/i386/pr31799.c [new file with mode: 0644]