This is an important case where we shouldn't look through llvm.noalias intrinsics when stripping pointer casts; when simplifying GEPs in InstCombine. If we did, then we always end up replacing the GEP pointer argument with the (simplified) pointer argument of the llvm.noalias intrinsic. Doing that destroys the information that the noalias intrinsic is providing about the pointer value.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM, seems reasonable. I wonder if we should have a transform which removes redundant aliasing intrinsics...