Commit 21866f2
committed
strlen: Fixup load alignment for memcmp
Like the previous commit but for strlen copy so we can backport
this commit. The loads should have the correct alignment on them
so we need to create newly aligned types when the alignment of the
pointer is less than the alignment of the current type.
Pushed as pre-approved by https://gcc.gnu.org/pipermail/gcc-patches/2025-September/694016.html
after a bootstrap/test on x86_64-linux-gnu.
PR tree-optimization/121776
gcc/ChangeLog:
* tree-ssa-strlen.cc (strlen_pass::handle_builtin_memcmp): Create
unaligned types if the alignment of the pointers is less
than the alignment of the new type.
Signed-off-by: Andrew Pinski <[email protected]>
(cherry picked from commit caa1c2f)1 parent f30c88d commit 21866f2
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4009 | 4009 | | |
4010 | 4010 | | |
4011 | 4011 | | |
4012 | | - | |
4013 | | - | |
| 4012 | + | |
| 4013 | + | |
| 4014 | + | |
| 4015 | + | |
| 4016 | + | |
| 4017 | + | |
| 4018 | + | |
| 4019 | + | |
| 4020 | + | |
| 4021 | + | |
4014 | 4022 | | |
4015 | 4023 | | |
4016 | 4024 | | |
| |||
0 commit comments