This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd35a41
commit 418ddbd
Showing
10 changed files
with
81 additions
and
13 deletions.
There are no files selected for viewing
12 changes: 8 additions & 4 deletions
12
gcc/testsuite/gcc.target/riscv/rvp32_scan/builtin-rvp-smar64.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
/* smar64 also appears on filename, so scan-assembler-times plus 1 */ | ||
/* This is a test program for smar64 instruction. */ | ||
/* { dg-do compile { target riscv32*-*-* } } */ | ||
/* { dg-options "-march=rv32gc_zpn_zpsf -mabi=ilp32d -O0" } */ | ||
/* { dg-options "-march=rv32gc_zpn_zpsf -mabi=ilp32d -O2" } */ | ||
|
||
#include <rvp_intrinsic.h> | ||
#include <stdlib.h> | ||
|
||
static __attribute__ ((noinline)) | ||
int64_t rams (int64_t t, int a, int b) | ||
int64_t rams (int64_t t, int32_t a, int32_t b) | ||
{ | ||
return __rv_smar64 (t, a, b); | ||
} | ||
/* { dg-final { scan-assembler-times "smar64" 2 } } */ | ||
|
||
int64_t test_autogen(int64_t t, int32_t a, int32_t b) { | ||
return t + (int64_t)a * (int64_t)b; | ||
} | ||
|
||
/* { dg-final { scan-assembler-times "smar64" 3 } } */ | ||
/* { dg-final { scan-assembler-times "builtin_riscv" 0 } } */ |
10 changes: 7 additions & 3 deletions
10
gcc/testsuite/gcc.target/riscv/rvp32_scan/builtin-rvp-smsr64.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
/* smsr64 also appears on filename, so scan-assembler-times plus 1 */ | ||
/* This is a test program for smsr64 instruction. */ | ||
/* { dg-do compile { target riscv32*-*-* } } */ | ||
/* { dg-options "-march=rv32gc_zpn_zpsf -mabi=ilp32d -O0" } */ | ||
/* { dg-options "-march=rv32gc_zpn_zpsf -mabi=ilp32d -O2" } */ | ||
|
||
#include <rvp_intrinsic.h> | ||
#include <stdlib.h> | ||
|
||
static __attribute__ ((noinline)) | ||
int64_t rsms (int64_t t, int a, int b) | ||
{ | ||
return __rv_smsr64 (t, a, b); | ||
} | ||
/* { dg-final { scan-assembler-times "smsr64" 2 } } */ | ||
|
||
int64_t test_autogen(int64_t t, int32_t a, int32_t b) { | ||
return t - (int64_t)a * (int64_t)b; | ||
} | ||
|
||
/* { dg-final { scan-assembler-times "smsr64" 3 } } */ | ||
/* { dg-final { scan-assembler-times "builtin_riscv" 0 } } */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
gcc/testsuite/gcc.target/riscv/rvp64_scan/builtin-rvp64-ukaddh.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* ukaddh also appears on filename, so scan-assembler-times plus 1 */ | ||
/* This is a test program for ukaddh instruction. */ | ||
/* { dg-do compile { target riscv64*-*-* } } */ | ||
/* { dg-options "-march=rv64gc_zpn_zpsf -mabi=lp64d -O0" } */ | ||
#include <rvp_intrinsic.h> | ||
#include <stdlib.h> | ||
static __attribute__ ((noinline)) | ||
uint32_t hddak (uint16_t ra, uint16_t rb) | ||
{ | ||
return __rv_ukaddh (ra, rb); | ||
} | ||
/* { dg-final { scan-assembler-times "ukaddh" 2 } } */ | ||
/* { dg-final { scan-assembler-times "builtin_riscv" 0 } } */ |
13 changes: 13 additions & 0 deletions
13
gcc/testsuite/gcc.target/riscv/rvp64_scan/builtin-rvp64-ukaddw.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* ukaddw also appears on filename, so scan-assembler-times plus 1 */ | ||
/* This is a test program for ukaddw instruction. */ | ||
/* { dg-do compile { target riscv64*-*-* } } */ | ||
/* { dg-options "-march=rv64gc_zpn_zpsf -mabi=lp64d -O0" } */ | ||
#include <rvp_intrinsic.h> | ||
#include <stdlib.h> | ||
static __attribute__ ((noinline)) | ||
int32_t wddak (int32_t ra, int32_t rb) | ||
{ | ||
return __rv_ukaddw (ra, rb); | ||
} | ||
/* { dg-final { scan-assembler-times "ukaddw" 2 } } */ | ||
/* { dg-final { scan-assembler-times "builtin_riscv" 0 } } */ |
13 changes: 13 additions & 0 deletions
13
gcc/testsuite/gcc.target/riscv/rvp64_scan/builtin-rvp64-uksubh.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* uksubh also appears on filename, so scan-assembler-times plus 1 */ | ||
/* This is a test program for uksubh instruction. */ | ||
/* { dg-do compile { target riscv64*-*-* } } */ | ||
/* { dg-options "-march=rv64gc_zpn_zpsf -mabi=lp64d -O0" } */ | ||
#include <rvp_intrinsic.h> | ||
#include <stdlib.h> | ||
static __attribute__ ((noinline)) | ||
uint32_t hbusk (uint16_t ra, uint16_t rb) | ||
{ | ||
return __rv_uksubh (ra, rb); | ||
} | ||
/* { dg-final { scan-assembler-times "uksubh" 2 } } */ | ||
/* { dg-final { scan-assembler-times "builtin_riscv" 0 } } */ |
13 changes: 13 additions & 0 deletions
13
gcc/testsuite/gcc.target/riscv/rvp64_scan/builtin-rvp64-uksubw.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* uksubw also appears on filename, so scan-assembler-times plus 1 */ | ||
/* This is a test program for uksubw instruction. */ | ||
/* { dg-do compile { target riscv64*-*-* } } */ | ||
/* { dg-options "-march=rv64gc_zpn_zpsf -mabi=lp64d -O0" } */ | ||
#include <rvp_intrinsic.h> | ||
#include <stdlib.h> | ||
static __attribute__ ((noinline)) | ||
uint32_t hbusk (uint32_t ra, uint32_t rb) | ||
{ | ||
return __rv_uksubw (ra, rb); | ||
} | ||
/* { dg-final { scan-assembler-times "uksubw" 2 } } */ | ||
/* { dg-final { scan-assembler-times "builtin_riscv" 0 } } */ |