{"push_id":2467708534,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"dc3d0a9fd5b3675b1fc1e6024a0c1e05cf92ecb1","before":"4153cbb32446a1e9230aabe7a0abaee793094e64","commits":[{"sha":"dc3d0a9fd5b3675b1fc1e6024a0c1e05cf92ecb1","author":{"name":"Max Kazantsev","email":"126b382300ba84ca1bf6db52c0b4ca707d2309ed@azul.com"},"message":"[IRCE] Relax restriction on collected range checks\n\nIn IRCE, we have a very old legacy check that works when we collect comparisons that we\ntreat as range checks. It ensures that the value against which the indvar is compared is\nloop invariant and is also positive.\n\nThis latter condition remained there since the times when IRCE was only able to handle\nsigned latch comparison. As the optimization evolved, it now learned how to intersect\nsigned or unsigned ranges, and this logic has no reliance on the fact that the right border\nof each range should be positive.\n\nThe old implementation of this non-negativity check was also naive enough and just looked\ninto ranges (while most of other IRCE logic tries to use power of SCEV implications), so this\ncheck did not allow to deal with the most simple case that looks like follows:\n\n  int size; // not known non-negative\n  int length; //known non-negative;\n  i = 0;\n  if (size != 0) {\n    do {\n      range_check(i < size);\n      range_check(i < length);\n    ++i;\n    } while (i < size)\n  }\n\nIn this case, even if from some dominating conditions IRCE could parse loop\nstructure, it could only remove the range check against `length` and simply\nignored the check against `size`.\n\nIn this patch we remove this obsolete check. It will allow IRCE to pick comparison\nagainst `size` as a potential range check and then let Range Intersection logic\ndecide whether it is OK to eliminate it or not.\n\nDifferential Revision: https://reviews.llvm.org/D45362\nReviewed By: samparker","distinct":true,"url":"https://api.github.com/repos/llvm-project/llvm-project-submodule/commits/dc3d0a9fd5b3675b1fc1e6024a0c1e05cf92ecb1"}]}
{"actor":{"display_login":"chapuni"}}