aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.cc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2025-01-10 09:32:05 -0300
committerAlexandre Oliva <oliva@gnu.org>2025-01-10 09:32:05 -0300
commit38401c58f4aae31fd29a16607e9018cb1f66c3ed (patch)
treef91dfb138e722492b9ccaa17311a6079fe6bc20a /gcc/c/c-parser.cc
parentd019ab4f115caab48316c185c007765719e93052 (diff)
downloadgcc-38401c58f4aae31fd29a16607e9018cb1f66c3ed.zip
gcc-38401c58f4aae31fd29a16607e9018cb1f66c3ed.tar.gz
gcc-38401c58f4aae31fd29a16607e9018cb1f66c3ed.tar.bz2
ifcombine field-merge: improve handling of dwords
On 32-bit hosts, data types with 64-bit alignment aren't getting treated as desired by ifcombine field-merging: we limit the choice of modes at BITS_PER_WORD sizes, but when deciding the boundary for a split, we'd limit the choice only by the alignment, so we wouldn't even consider a split at an odd 32-bit boundary. Fix that by limiting the boundary choice by word choice as well. Now, this would still leave misaligned 64-bit fields in 64-bit-aligned data structures unhandled by ifcombine on 32-bit hosts. We already need to loading them as double words, and if they're not byte-aligned, the code gets really ugly, but ifcombine could improve it if it allows double-word loads as a last resort. I've added that. for gcc/ChangeLog * gimple-fold.cc (fold_truth_andor_for_ifcombine): Limit boundary choice by word size as well. Try aligned double-word loads as a last resort. for gcc/testsuite/ChangeLog * gcc.dg/field-merge-17.c: New.
Diffstat (limited to 'gcc/c/c-parser.cc')
0 files changed, 0 insertions, 0 deletions