diff options
author | Pan Li <pan2.li@intel.com> | 2024-11-22 11:48:26 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-11-27 22:37:11 +0800 |
commit | 4a8685911697c237ff8c0589827eb8649f8440f1 (patch) | |
tree | b4533649eb84f32218a62fba27761de5673203ef /gcc/c/c-parser.cc | |
parent | 83f200fa7a8ad905e47b2344065406f32730646b (diff) | |
download | gcc-4a8685911697c237ff8c0589827eb8649f8440f1.zip gcc-4a8685911697c237ff8c0589827eb8649f8440f1.tar.gz gcc-4a8685911697c237ff8c0589827eb8649f8440f1.tar.bz2 |
I386: Add more testcases for unsigned SAT_ADD vector pattern
Some forms like below failed to be recognized as a SAT_ADD pattern
for target i386. It is related to some match pattern
extraction but get fixed after the refactor of the SAT_ADD
pattern. Thus, add testcases to ensure we won't have similar
issues in the future.
#define DEF_SAT_ADD(T) \
T sat_add_##T (T x, T y) \
{ \
T res; \
res = x + y; \
res |= -(T)(res < x); \
return res; \
}
#define VEC_DEF_SAT_ADD(T) \
void vec_sat_add(T * restrict a, T * restrict b) \
{ \
for (int i = 0; i < 8; i++) \
b[i] = sat_add_##T (a[i], b[i]); \
}
DEF_SAT_ADD (uint32_t)
VEC_DEF_SAT_ADD (uint32_t)
The below test suites are passed for this patch.
make -k check-gcc RUNTESTFLAGS="--target_board=unix\{,-m32\} i386.exp=pr112600-5a-*.c"
PR target/112600
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr112600-5-u16.c: New test.
* gcc.target/i386/pr112600-5-u32.c: New test.
* gcc.target/i386/pr112600-5-u64.c: New test.
* gcc.target/i386/pr112600-5-u8.c: New test.
* gcc.target/i386/pr112600-5.h: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'gcc/c/c-parser.cc')
0 files changed, 0 insertions, 0 deletions