We usually only check direct use instruction of IV, while the
bitcast of 'ptrtoint ptr to i64' doesn't affect the result, so go
a step further.
Fix https://github.com/llvm/llvm-project/issues/59633.
Details
Details
Diff Detail
Diff Detail
| Paths 
 |  Differential  D151877  
[IndVars] Add check of loop invariant for indirect use ClosedPublic Authored by Allen on Jun 1 2023, 4:13 AM. 
Details Summary We usually only check direct use instruction of IV, while the 
Diff Detail Event TimelineThis revision is now accepted and ready to land.Jun 1 2023, 5:56 AM Closed by commit rG34d380e1f63a: [IndVars] Add check of loop invariant for indirect use (authored by Allen).  ·  Explain WhyJun 3 2023, 7:33 AM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
Diff 527357 llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
 llvm/test/Transforms/IndVarSimplify/pr59633.ll
 
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||