aboutsummaryrefslogtreecommitdiff
path: root/libssp
diff options
context:
space:
mode:
authorPan Li <pan2.li@intel.com>2024-05-09 10:56:46 +0800
committerPan Li <pan2.li@intel.com>2024-05-09 18:48:11 +0800
commitb1520d2260c5e0cfcd7a4354fab70f66e2912ff2 (patch)
tree8a15499b0435918c508885da602e2a3f280f4c84 /libssp
parentde0b40ac5be8977a6bee8860f67d45011642f1a2 (diff)
downloadgcc-b1520d2260c5e0cfcd7a4354fab70f66e2912ff2.zip
gcc-b1520d2260c5e0cfcd7a4354fab70f66e2912ff2.tar.gz
gcc-b1520d2260c5e0cfcd7a4354fab70f66e2912ff2.tar.bz2
RISC-V: Make full-vec-move1.c test robust for optimization
During investigate the support of early break autovec, we notice the test full-vec-move1.c will be optimized to 'return 0;' in main function body. Because somehow the value of V type is compiler time constant, and then the second loop will be considered as assert (true). Thus, the ccp4 pass will eliminate these stmt and just return 0. typedef int16_t V __attribute__((vector_size (128))); int main () { V v; for (int i = 0; i < sizeof (v) / sizeof (v[0]); i++) (v)[i] = i; V res = v; for (int i = 0; i < sizeof (v) / sizeof (v[0]); i++) assert (res[i] == i); // will be optimized to assert (true) } This patch would like to introduce a extern function to use the res[i] that get rid of the ccp4 optimization. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls-vlmax/full-vec-move1.c: Introduce extern func use to get rid of ccp4 optimization. Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'libssp')
0 files changed, 0 insertions, 0 deletions