diff options
author | Richard Biener <rguenther@suse.de> | 2024-07-03 09:05:06 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-07-03 09:16:28 +0200 |
commit | 2be2145f4f14a79e4bb8e845168d7f0d25dc1b5b (patch) | |
tree | d666b396d20109c6cdc460cf7a01d4b5b1480f1d | |
parent | 038d64f62271ddc62aa35d0a5dfd3843fdb9e6d7 (diff) | |
download | gcc-2be2145f4f14a79e4bb8e845168d7f0d25dc1b5b.zip gcc-2be2145f4f14a79e4bb8e845168d7f0d25dc1b5b.tar.gz gcc-2be2145f4f14a79e4bb8e845168d7f0d25dc1b5b.tar.bz2 |
tree-optimization/115764 - testcase for BB SLP issue
The following adds a testcase for a CSE issue with BB SLP two operator
handling when we make those CSE aware by providing SLP_TREE_SCALAR_STMTS
for them. This was reduced from 526.blender_r.
PR tree-optimization/115764
* gcc.dg/vect/bb-slp-76.c: New testcase.
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/bb-slp-76.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-76.c b/gcc/testsuite/gcc.dg/vect/bb-slp-76.c new file mode 100644 index 0000000..b3b6a58 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-76.c @@ -0,0 +1,30 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-ffast-math" } */ + +typedef struct { + float xmin, xmax; +} rctf; +int U_0; +float BLI_rctf_size_x_rct_1, view_zoomdrag_apply_dx; +void *view_zoomdrag_apply_op_0; +float RNA_float_get(); +typedef struct { + rctf cur; +} View2D; +typedef struct { + View2D v2d; +} v2dViewZoomData; +void view_zoomdrag_apply() { + v2dViewZoomData *vzd = view_zoomdrag_apply_op_0; + View2D *v2d = &vzd->v2d; + view_zoomdrag_apply_dx = RNA_float_get(); + if (U_0) { + float mval_fac = BLI_rctf_size_x_rct_1, mval_faci = mval_fac, + ofs = mval_faci * view_zoomdrag_apply_dx; + v2d->cur.xmin += ofs + view_zoomdrag_apply_dx; + v2d->cur.xmax += ofs - view_zoomdrag_apply_dx; + } else { + v2d->cur.xmin += view_zoomdrag_apply_dx; + v2d->cur.xmax -= view_zoomdrag_apply_dx; + } +} |