From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id 9CE193858C3A; Sat, 4 Dec 2021 09:22:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CE193858C3A Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] [PR103302] add testcase X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: f590bee0231b2e146ffb314e920e9f3f2f63d9b6 X-Git-Newrev: a31009cdaa2c037f6c0b75a2a737e0c479dc5e6a Message-Id: <20211204092228.9CE193858C3A@sourceware.org> Date: Sat, 4 Dec 2021 09:22:28 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Dec 2021 09:22:28 -0000 https://gcc.gnu.org/g:a31009cdaa2c037f6c0b75a2a737e0c479dc5e6a commit a31009cdaa2c037f6c0b75a2a737e0c479dc5e6a Author: Alexandre Oliva Date: Fri Dec 3 05:46:12 2021 -0300 [PR103302] add testcase Diff: --- gcc/testsuite/gcc.target/riscv/pr103302.c | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gcc/testsuite/gcc.target/riscv/pr103302.c b/gcc/testsuite/gcc.target/riscv/pr103302.c new file mode 100644 index 00000000000..822c4087416 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/pr103302.c @@ -0,0 +1,47 @@ +/* { dg-do run } */ +/* { dg-options "-Og -fharden-compares -fno-tree-dce -fno-tree-fre " } */ + +typedef unsigned char u8; +typedef unsigned char __attribute__((__vector_size__ (32))) v256u8; +typedef unsigned short __attribute__((__vector_size__ (32))) v256u16; +typedef unsigned short __attribute__((__vector_size__ (64))) v512u16; +typedef unsigned int u32; +typedef unsigned int __attribute__((__vector_size__ (4))) v512u32; +typedef unsigned long long __attribute__((__vector_size__ (32))) v256u64; +typedef unsigned long long __attribute__((__vector_size__ (64))) v512u64; +typedef unsigned __int128 __attribute__((__vector_size__ (32))) v256u128; +typedef unsigned __int128 __attribute__((__vector_size__ (64))) v512u128; + +v512u16 g; + +void +foo0 (u8 u8_0, v256u16 v256u16_0, v512u16 v512u16_0, u32 u32_0, v512u32, + v256u64 v256u64_0, v512u64 v512u64_0, v256u128 v256u128_0, + v512u128 v512u128_0) +{ + u32_0 <= (v512u128) (v512u128_0 != u8_0); + v512u64 v512u64_1 = + __builtin_shufflevector (v256u64_0, v512u64_0, 7, 8, 0, 9, 5, 0, 3, 1); + g = v512u16_0; + (v256u8) v256u16_0 + (v256u8) v256u128_0; +} + +int +main (void) +{ + foo0 (40, (v256u16) + { + }, (v512u16) + { + }, 0, (v512u32) + { + }, (v256u64) + { + }, (v512u64) + { + }, (v256u128) + { + }, (v512u128) + { + }); +}