From 31f06cac2991481dd657df87832d6a6aa5ce5558 Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Wed, 10 Apr 2019 20:29:57 +0000 Subject: [PATCH] re PR rtl-optimization/87763 (aarch64 target testcases fail after r265398) 2018-04-10 Steve Ellcey PR rtl-optimization/87763 * gcc.target/aarch64/combine_bfxil.c: Change some bfxil checks to bfi. * gcc.target/aarch64/combine_bfi_2.c: New test. From-SVN: r270267 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/aarch64/combine_bfi_2.c | 15 +++++++++++++++ gcc/testsuite/gcc.target/aarch64/combine_bfxil.c | 3 ++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/combine_bfi_2.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f69d6f2f82..71ae61702e3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2018-04-10 Steve Ellcey + + PR rtl-optimization/87763 + * gcc.target/aarch64/combine_bfxil.c: Change some bfxil checks + to bfi. + * gcc.target/aarch64/combine_bfi_2.c: New test. + 2019-04-10 Jakub Jelinek PR middle-end/90025 diff --git a/gcc/testsuite/gcc.target/aarch64/combine_bfi_2.c b/gcc/testsuite/gcc.target/aarch64/combine_bfi_2.c new file mode 100644 index 00000000000..145282d4d55 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/combine_bfi_2.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int f1(int x, int y) +{ + return (y & 0xfffffff) | (((x <<28) & 0xf0000000)); +} + + +int f2(int x, int y) +{ + return (((x <<28) & 0xf0000000)) | (y & 0xfffffff); +} + +/* { dg-final { scan-assembler-times {\tbfi\t} 2 } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/combine_bfxil.c b/gcc/testsuite/gcc.target/aarch64/combine_bfxil.c index 109f989a2f0..a2fb31c7446 100644 --- a/gcc/testsuite/gcc.target/aarch64/combine_bfxil.c +++ b/gcc/testsuite/gcc.target/aarch64/combine_bfxil.c @@ -114,4 +114,5 @@ main (void) return 0; } -/* { dg-final { scan-assembler-times "bfxil\\t" 18 } } */ +/* { dg-final { scan-assembler-times "bfxil\\t" 7 } } */ +/* { dg-final { scan-assembler-times "bfi\\t" 11 } } */ -- 2.30.2