[clang] [clang] add array out-of-bounds access constraints using llvm.assume (PR #159046)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 1 08:37:42 PDT 2025
https://github.com/nikic commented:
Yes, the general problem with assumes is that, while they help some optimizations by providing additional information, they can regress others due to the added instructions/uses. Hard to say in advance whether a specific assume use it more beneficial than detrimental.
Possibly LoopVectorize should be dropping assumes altogether -- generating assume of extractelement doesn't look particularly useful to me. Adding another late run of the DropUnnecessaryAssumes pass I recently added would probably also avoid that particular issue.
https://github.com/llvm/llvm-project/pull/159046
More information about the cfe-commits
mailing list