[PATCH] D154156: [IRCE][NFC] Set Index and End together inside parseRangeCheckICmp

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 2 21:29:27 PDT 2023


skatkov accepted this revision.
skatkov added a comment.
This revision is now accepted and ready to land.

LGTM with nit.



================
Comment at: llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:252
 /// Parse a single ICmp instruction, `ICI`, into a range check.  If `ICI` cannot
 /// be interpreted as a range check, return false and set `Index` and `End`
 /// to `nullptr`.  Otherwise set `Index` to the SCEV being range checked, and
----------------
According to specification of this method if we return false, Index and End must be set to nullptr. I do not see this in the code.

Could please update specification or change to implementation accordingly.

I see only one usage of this method and it does not require to set Index and End to nullptr, so I guess that updating of specification is a right way to go.


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

https://reviews.llvm.org/D154156



More information about the llvm-commits mailing list