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

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 04:03:11 PDT 2022


skatkov added a comment.

In D128322#3601261 <https://reviews.llvm.org/D128322#3601261>, @nikic wrote:

> 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.

Let's wait a bit what other say. But it may work.


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

https://reviews.llvm.org/D128322



More information about the llvm-commits mailing list