{"push_id":926109970,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"f3ba9f9b6a25e346e1633c405868c96d8b102a8a","before":"83fc76e8ebb4a81ff3142035d29275e60afa3ada","commits":[{"sha":"f3ba9f9b6a25e346e1633c405868c96d8b102a8a","author":{"email":"35e141d918c3ab40e625222c41fcc8b2333c1294@arm.com","name":"Silviu Baranga"},"message":"[InstCombine] Look through PHIs, GEPs, IntToPtrs and PtrToInts to expose more constants when comparing GEPs\n\nSummary:\nWhen comparing two GEP instructions which have the same base pointer\nand one of them has a constant index, it is possible to only compare\nindices, transforming it to a compare with a constant. This removes\none use for the GEP instruction with the constant index, can reduce\nregister pressure and can sometimes lead to removing the comparisson\nentirely.\n\nInstCombine was already doing this when comparing two GEPs if the\nbase pointers were the same. However, in the case where we have\ncomplex pointer arithmetic (GEPs applied to GEPs, PHIs of GEPs,\nconversions to or from integers, etc) the value of the original\nbase pointer will be hidden to the optimizer and this transformation\nwill be disabled.\n\nThis change detects when the two sides of the comparison can be\nexpressed as GEPs with the same base pointer, even if they don't\nappear as such in the IR. The transformation will convert all the\npointer arithmetic to arithmetic done on indices and all the\nrelevant uses of GEPs to GEPs with a common base pointer. The\nGEP comparison will be converted to a comparison done on indices.\n\nReviewers: majnemer, jmolloy\n\nSubscribers: hfinkel, jevinskie, jmolloy, aadg, llvm-commits\n\nDifferential Revision: http://reviews.llvm.org/D15146\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257064 91177308-0d34-0410-b5e6-96231b3b80d8","distinct":true,"url":"https://api.github.com/repos/llvm-project/llvm/commits/f3ba9f9b6a25e346e1633c405868c96d8b102a8a"}]}