Backends should fold the subtraction into the comparison, but not all
seem to. Moreover, on targets where pointers are not integers, such as
CHERI, an integer subtraction is not appropriate. Instead we should just
compare the two pointers directly, as this should work everywhere and
potentially generate more efficient code.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This seems obviously correct(C) to me, so LG, https://rise4fun.com/Alive/rR6
Git speluking suggests it was that way since the beginning (rL188755),
so it's not like this was changed the opposite way to fix something..