[InstCombine] Relax the same-underlying-object constraint for the GEP canonicalization (#76583)
https://github.com/llvm/llvm-project/commit/7d7001b2cbd05bb1955c18e7f8668644bd1258dc canonicalizes `(gep i8, X, (ptrtoint Y) - (ptrtoint X))` into `bitcast Y` iff `X` and `Y` have the same underlying object. I find that the result of this pattern is usually used as an operand of an icmp in some real-world applications. I think we can do the canonicalization if the result is only used by icmps/ptrtoints. Alive2: https://alive2.llvm.org/ce/z/j4-HJZ
parent
c313d0d0
Please register or sign in to comment