diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-10-28 13:29:58 -0700 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-10-28 13:32:05 -0700 |
commit | e20ced2cb83c015ad1f934957002a2874b6f7c93 (patch) | |
tree | 4cf7490981123e8e0ff278add44844c207eabb58 /gcc | |
parent | 6638fcc161350e1d68c0739356b286cff947470b (diff) | |
download | gcc-e20ced2cb83c015ad1f934957002a2874b6f7c93.zip gcc-e20ced2cb83c015ad1f934957002a2874b6f7c93.tar.gz gcc-e20ced2cb83c015ad1f934957002a2874b6f7c93.tar.bz2 |
testcase: Add testcase for PR 117330 [PR117330]
This testcase was causing an ICE during vectorization
due to r15-4695-gd17e672ce82e69 but was fixed with
r15-4713-g0942bb85fc5573.
Pushed as obvious after a quick test on x86_64-linux-gnu to
make sure the testcase passes.
PR tree-optimization/117330
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr117330-1.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr117330-1.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr117330-1.c b/gcc/testsuite/gcc.dg/torture/pr117330-1.c new file mode 100644 index 0000000..2626248 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr117330-1.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ + +/* This used to ICE during vectorization + dealing with the removal of comparisons inside COND_EXPR. */ +/* PR tree-optimization/117330 */ + + +enum psi_states { + PSI_IO_NONE, + PSI_IO_ONE, + PSI_IO_TWO, +}; +void f(unsigned *times, + unsigned *times1, + unsigned state_mask) { + enum psi_states s; + for (s = 0; s < 2; s++) { + if (state_mask & (1 << s)) + times[s] += 1; + times[s] = times[s] - times1[s]; + } +} |