i386.md (*popcounthi2_1): New insn_and_split pattern.
* config/i386/i386.md (*popcounthi2_1): New insn_and_split pattern. testsuite/ChangeLog: * gcc.target/i386/pr59874-3.c: New test. From-SVN: r243811
This commit is contained in:
parent
f56013e541
commit
6418b07737
@ -1,6 +1,10 @@
|
||||
2016-12-19 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.md (*popcounthi2_1): New insn_and_split pattern.
|
||||
|
||||
2016-12-19 Sandra Loosemore <sandra@codesourcery.com>
|
||||
|
||||
* doc/cpp.texi: Clean up anachronistic C99 references and remove
|
||||
* doc/cpp.texi: Clean up anachronistic C99 references and remove
|
||||
discussion of very old GCC versions.
|
||||
(Differences from previous versions): Delete entire section.
|
||||
|
||||
@ -183,8 +187,7 @@
|
||||
* config/arc/arc.md (mulsidi_600): Change to insn_and_split,
|
||||
generate new mul64 insn for core multiplication work.
|
||||
(umulsidi_600): Likewise, but use mulu64 insn.
|
||||
(mul64): New pattern, content taken from old mulsidi_600 insn
|
||||
pattern.
|
||||
(mul64): New pattern, content taken from old mulsidi_600 insn pattern.
|
||||
(mulu64): Likewise, but using umulsidi_600.
|
||||
(mulsidi3): Remove move to destination, this is now handled by
|
||||
mulsidi_600 insn_and_split.
|
||||
|
@ -13221,6 +13221,24 @@
|
||||
(set_attr "type" "bitmanip")
|
||||
(set_attr "mode" "<MODE>")])
|
||||
|
||||
(define_insn_and_split "*popcounthi2_1"
|
||||
[(set (match_operand:SI 0 "register_operand")
|
||||
(popcount:SI
|
||||
(zero_extend:SI (match_operand:HI 1 "nonimmediate_operand"))))
|
||||
(clobber (reg:CC FLAGS_REG))]
|
||||
"TARGET_POPCNT
|
||||
&& can_create_pseudo_p ()"
|
||||
"#"
|
||||
"&& 1"
|
||||
[(const_int 0)]
|
||||
{
|
||||
rtx tmp = gen_reg_rtx (HImode);
|
||||
|
||||
emit_insn (gen_popcounthi2 (tmp, operands[1]));
|
||||
emit_insn (gen_zero_extendhisi2 (operands[0], tmp));
|
||||
DONE;
|
||||
})
|
||||
|
||||
(define_insn "popcounthi2"
|
||||
[(set (match_operand:HI 0 "register_operand" "=r")
|
||||
(popcount:HI
|
||||
|
@ -1,18 +1,21 @@
|
||||
2016-12-19 Will Schmidt <will_schmidt@vnet.ibm.com>
|
||||
2016-12-19 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* gcc.dg/vmx/mult-even-odd-be-order.c: Mark
|
||||
variables as volatile.
|
||||
* gcc.target/powerpc/fold-vec-mult-char.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-float.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-floatdouble.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-int.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-int128-p8.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-int128-p9.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-longlong.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-short.c: New.
|
||||
* gcc.target/i386/pr59874-3.c: New test.
|
||||
|
||||
2016-12-19 Will Schmidt <will_schmidt@vnet.ibm.com>
|
||||
|
||||
|
||||
* gcc.dg/vmx/mult-even-odd-be-order.c: Mark variables as volatile.
|
||||
* gcc.target/powerpc/fold-vec-mult-char.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-float.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-floatdouble.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-int.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-int128-p8.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-int128-p9.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-longlong.c: New.
|
||||
* gcc.target/powerpc/fold-vec-mult-short.c: New.
|
||||
|
||||
2016-12-19 Will Schmidt <will_schmidt@vnet.ibm.com>
|
||||
|
||||
* gcc.target/powerpc/fold-vec-sub-char.c: New.
|
||||
* gcc.target/powerpc/fold-vec-sub-float.c: New.
|
||||
* gcc.target/powerpc/fold-vec-sub-floatdouble.c: New.
|
||||
@ -39,7 +42,7 @@
|
||||
2016-12-17 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/78746
|
||||
* charlen_03.f90: Remove test.
|
||||
* charlen_03.f90: Remove test.
|
||||
* charlen_10.f90: Ditto.
|
||||
|
||||
2016-12-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
10
gcc/testsuite/gcc.target/i386/pr59874-3.c
Normal file
10
gcc/testsuite/gcc.target/i386/pr59874-3.c
Normal file
@ -0,0 +1,10 @@
|
||||
/* PR target/59874 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -mpopcnt -masm=att" } */
|
||||
/* { dg-final { scan-assembler "popcntw" } } */
|
||||
|
||||
unsigned int
|
||||
foo (unsigned short x)
|
||||
{
|
||||
return __builtin_popcount (x);
|
||||
}
|
Loading…
Reference in New Issue
Block a user