[AArch64] PR target/69613: Return zero TARGET_SHIFT_TRUNCATION_MASK when SHIFT_COUNT_TRUNCATED is false
PR target/69613 * config/aarch64/aarch64.c (aarch64_shift_truncation_mask): Return 0 if !SHIFT_COUNT_TRUNCATED. * gcc.dg/torture/pr69613.c: New test. From-SVN: r233744
This commit is contained in:
parent
a2ad54a07a
commit
ac59ad4efc
|
@ -1,3 +1,9 @@
|
|||
2016-02-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
PR target/69613
|
||||
* config/aarch64/aarch64.c (aarch64_shift_truncation_mask):
|
||||
Return 0 if !SHIFT_COUNT_TRUNCATED.
|
||||
|
||||
2016-02-26 Jakub Jelinek <jakub@redhat.com>
|
||||
Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
|
|
|
@ -11154,7 +11154,8 @@ static unsigned HOST_WIDE_INT
|
|||
aarch64_shift_truncation_mask (machine_mode mode)
|
||||
{
|
||||
return
|
||||
(aarch64_vector_mode_supported_p (mode)
|
||||
(!SHIFT_COUNT_TRUNCATED
|
||||
|| aarch64_vector_mode_supported_p (mode)
|
||||
|| aarch64_vect_struct_mode_p (mode)) ? 0 : (GET_MODE_BITSIZE (mode) - 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2016-02-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
PR target/69613
|
||||
* gcc.dg/torture/pr69613.c: New test.
|
||||
|
||||
2016-02-26 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/69891
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/* PR target/69613. */
|
||||
/* { dg-do run { target int128 } } */
|
||||
/* { dg-additional-options "-mavx" { target { i?86-*-* x86_64-*-* } } } */
|
||||
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned short v32u16 __attribute__ ((vector_size (32)));
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned int v32u32 __attribute__ ((vector_size (32)));
|
||||
typedef unsigned long long u64;
|
||||
typedef unsigned long long v32u64 __attribute__ ((vector_size (32)));
|
||||
typedef unsigned __int128 u128;
|
||||
typedef unsigned __int128 v32u128 __attribute__ ((vector_size (32)));
|
||||
|
||||
u128 __attribute__ ((noinline, noclone))
|
||||
foo (u32 u32_0, u64 u64_1, u128 u128_1, v32u16 v32u16_0, v32u128 v32u128_0,
|
||||
v32u16 v32u16_1, v32u32 v32u32_1, v32u64 v32u64_1, v32u128 v32u128_1)
|
||||
{
|
||||
u128 temp = (v32u128_1[0] << ((-u32_0) & 127));
|
||||
u32 t2 = (u32_0 & 127);
|
||||
v32u128_1[0] = (v32u128_1[0] >> t2);
|
||||
|
||||
v32u128_1[0] ^= temp;
|
||||
v32u128_1 |= (v32u128){ v32u128_0[1] };
|
||||
|
||||
return u64_1 + u128_1 + v32u16_0[0] + v32u16_0[1] + v32u16_1[11]
|
||||
+ v32u16_1[12] + v32u16_1[13] + v32u32_1[0] + v32u32_1[1]
|
||||
+ v32u32_1[2] + v32u64_1[1] + v32u64_1[2] + v32u64_1[3] + v32u128_1[0]
|
||||
+ v32u128_1[1];
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
u128 x
|
||||
= foo (1, 1, 1, (v32u16){ 1, 1, 1 }, (v32u128){ 1 }, (v32u16){ 1, 1, 1 },
|
||||
(v32u32){ 1 }, (v32u64){ 1, 1, 1 }, (v32u128){ -1 });
|
||||
if (x != 6)
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue