From 8509584524592955a721ffb7ecfb38b70eee2e51 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 10 Jan 2020 08:18:09 +0000 Subject: [PATCH] re PR testsuite/93216 (gcc.dg/optimize-bswaphi-1.c fails starting with r280034) 2020-01-10 Richard Biener PR testsuite/93216 * gcc.dg/optimize-bswaphi-1.c: Split previously added case into a LE and BE variant. From-SVN: r280097 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/optimize-bswaphi-1.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0c1dee3497a..0c9408eba12 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-01-10 Richard Biener + + PR testsuite/93216 + * gcc.dg/optimize-bswaphi-1.c: Split previously added + case into a LE and BE variant. + 2020-01-09 Thomas Koenig PR fortran/65428 diff --git a/gcc/testsuite/gcc.dg/optimize-bswaphi-1.c b/gcc/testsuite/gcc.dg/optimize-bswaphi-1.c index e9338d67872..d045da9ea80 100644 --- a/gcc/testsuite/gcc.dg/optimize-bswaphi-1.c +++ b/gcc/testsuite/gcc.dg/optimize-bswaphi-1.c @@ -55,10 +55,17 @@ swap16 (HItype in) } unsigned short -get_unaligned_16 (unsigned char *p) +get_unaligned_16_le (unsigned char *p) { return p[0] | (p[1] << 8); } +unsigned short +get_unaligned_16_be (unsigned char *p) +{ + return p[1] | (p[0] << 8); +} + + /* { dg-final { scan-tree-dump-times "16 bit load in target endianness found at" 4 "bswap" } } */ -/* { dg-final { scan-tree-dump-times "16 bit bswap implementation found at" 4 "bswap" } } */ +/* { dg-final { scan-tree-dump-times "16 bit bswap implementation found at" 5 "bswap" } } */ -- 2.30.2