diff options
author | Dmitrij Pochepko <dmitrij.pochepko@bell-sw.com> | 2019-10-08 21:53:03 +0000 |
---|---|---|
committer | Steve Ellcey <sje@gcc.gnu.org> | 2019-10-08 21:53:03 +0000 |
commit | 0eeb34b29937338a8087216c49d3837b69107238 (patch) | |
tree | 4dfa1d239294963b761b515b8e82e55461f3af0f /gcc/testsuite/lib/target-supports.exp | |
parent | ac87f0f3459a57f03503e51aeffc54bb6ef36b90 (diff) |
re PR tree-optimization/90836 (Missing popcount pattern matching)
2019-10-08 Dmitrij Pochepko <dmitrij.pochepko@bell-sw.com>
PR tree-optimization/90836
* lib/target-supports.exp (check_effective_target_popcount)
(check_effective_target_popcountll): New effective targets.
* gcc.dg/tree-ssa/popcount4.c: New test.
* gcc.dg/tree-ssa/popcount4l.c: New test.
* gcc.dg/tree-ssa/popcount4ll.c: New test.
From-SVN: r276722
Diffstat (limited to 'gcc/testsuite/lib/target-supports.exp')
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index a7b76b69b75..179202f0f7d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -6933,6 +6933,29 @@ proc check_effective_target_popcountl { } { } "" ] } +# Return 1 if the target supports popcount on long long. + +proc check_effective_target_popcountll { } { + return [check_no_messages_and_pattern popcountll "!\\(call" rtl-expand { + int foo (long long b) + { + return __builtin_popcountll (b); + } + } "" ] +} + + +# Return 1 if the target supports popcount on int. + +proc check_effective_target_popcount { } { + return [check_no_messages_and_pattern popcount "!\\(call" rtl-expand { + int foo (int b) + { + return __builtin_popcount (b); + } + } "" ] +} + # Return 1 if the target supports atomic operations on "long long" # and can execute them. # |