Skip to content

Conversation

@Flowdalic
Copy link

The cheri-inefficient diagnostic message only mentioned an underaligned destination, whereas an underaligned source can also trigger it. Fix the diagnostic message by mentioning not only an underaligned destination but also an underaligned source as potential causes.

@jrtc27
Copy link
Member

jrtc27 commented Dec 24, 2025

This warning is a bit dodgy anyway, it gives a bunch of false positives and shouldn't really be a warning at all when it does fire given it's in the backend (maybe an optimisation remark if anything?). The test suite is failing because clang/test/CodeGen/cheri/memcpy-unaligned.c checks the warning that gets emitted, and warn_cheri_memintrin_misaligned_inefficient has a copy of this warning message (though I don't think it's actually used).

@jrtc27 jrtc27 changed the base branch from master to dev December 24, 2025 12:00
@Flowdalic Flowdalic force-pushed the cheri-inefficient-source-cause branch from f56e9a8 to c836750 Compare December 28, 2025 17:09
The cheri-inefficient diagnostic message only mentioned an
underaligned destination, whereas an underaligned source can also
trigger it. Fix the diagnostic message by mentioning not only an
underaligned destination but also an underaligned source as potential
causes.
@Flowdalic Flowdalic force-pushed the cheri-inefficient-source-cause branch from c836750 to 40d7a89 Compare December 28, 2025 17:10
Copy link
Member

@arichardson arichardson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty bad warnin, sorry about that! New message is better and helpful until this is fixed properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants