[PATCH] D128322: [GuardWidening] Use logical and in widenCondCommon as it stated in doc

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 04:01:14 PDT 2022


nikic added a comment.

I don't follow the implementation details here, but based on test changes this looks like the right approach.

> What worries me is that usage of select may break parseRangeChecks logic
> where it expects arithmetic and to split already widened condition...

Possibly you want to replace the matcher there with `m_LogicalAnd`. This is safe if the range checks in question are of the form `X pred C1 && X pred C2`, i.e. both work on the same variable, and the other side is a constant. If not, then more care might be needed.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128322/new/

https://reviews.llvm.org/D128322



More information about the llvm-commits mailing list