[all-commits] [llvm/llvm-project] e3f24d: [LoopIdiom] Use SCEV for deciding memmove validity...
John Brawn via All-commits
all-commits at lists.llvm.org
Wed Jul 29 08:36:38 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e3f24d8cf7d07d8c7f6208e5cce4b422cb1d0806
https://github.com/llvm/llvm-project/commit/e3f24d8cf7d07d8c7f6208e5cce4b422cb1d0806
Author: John Brawn <john.brawn at arm.com>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
M llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
A llvm/test/Transforms/LoopIdiom/memmove-ext.ll
Log Message:
-----------
[LoopIdiom] Use SCEV for deciding memmove validity (#211274)
When the loop index variable is smaller than the GEP offset size, and is
thus sign or zero extended before being used, then the IR that is
expanded from the SCEV expressions for the load and store locations will
be in a form that means GetPointerBaseWithConstantOffset can't deduce
the base and offset, meaning we can't generate memmove.
Solve this by deciding memmove validity based on the SCEV expressions
instead of the IR that is expanded from them. This means we also need to
insert a check to handle a null base pointer, as that was previously
handled implicitly due to how SCEVExpander expands expressions involving
null pointers.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list