diff options
author | Tamar Christina <tamar.christina@arm.com> | 2024-07-17 16:22:14 +0100 |
---|---|---|
committer | Tamar Christina <tamar.christina@arm.com> | 2024-07-17 16:22:14 +0100 |
commit | 0135a90de5a99b51001b6152d8b548151ebfa1c3 (patch) | |
tree | 98dd011c615771e494c984a2ed1c23181a9b85e5 /boehm-gc/blacklst.c | |
parent | 247335823f420eb1dd56f4bf32ac78d441f5ccc2 (diff) | |
download | gcc-0135a90de5a99b51001b6152d8b548151ebfa1c3.zip gcc-0135a90de5a99b51001b6152d8b548151ebfa1c3.tar.gz gcc-0135a90de5a99b51001b6152d8b548151ebfa1c3.tar.bz2 |
middle-end: fix 0 offset creation and folding [PR115936]
As shown in PR115936 SCEV and IVOPTS create an invalidate IV when the IV is
a pointer type:
ivtmp.39_65 = ivtmp.39_59 + 0B;
where the IVs are DI mode and the offset is a pointer.
This comes from this weird candidate:
Candidate 8:
Var befor: ivtmp.39_59
Var after: ivtmp.39_65
Incr POS: before exit test
IV struct:
Type: sizetype
Base: 0
Step: 0B
Biv: N
Overflowness wrto loop niter: No-overflow
This IV was always created just ended up not being used.
This is created by SCEV.
simple_iv_with_niters in the case where no CHREC is found creates an IV with
base == ev, offset == 0;
however in this case EV is a POINTER_PLUS_EXPR and so the type is a pointer.
it ends up creating an unusable expression.
gcc/ChangeLog:
PR tree-optimization/115936
* tree-scalar-evolution.cc (simple_iv_with_niters): Use sizetype for
pointers.
Diffstat (limited to 'boehm-gc/blacklst.c')
0 files changed, 0 insertions, 0 deletions