Page MenuHomePhabricator

[MergeFuncs] Fix bug in merging GetElementPointers
ClosedPublic

Authored by jrkoenig on Sep 11 2015, 4:02 PM.

Details

Summary

GetElementPointers must have the first argument's type compared
for structural equivalence. Previously the code erroneously compared the
pointer's type, but this code was dead because all pointer types (of the
same address space) are the same. The pointee must be compared instead
(using the type stored in the GEP, not from the pointer type which will
be erased anyway).

Diff Detail

Repository
rL LLVM

Event Timeline

jrkoenig retitled this revision from to [MergeFuncs] Fix bug in merging GetElementPointers.
jrkoenig updated this object.
jrkoenig added reviewers: jfb, dschuff.
jrkoenig added subscribers: llvm-commits, nlewycky.
nlewycky accepted this revision.Sep 11 2015, 4:14 PM
nlewycky added a reviewer: nlewycky.

LGTM

This revision is now accepted and ready to land.Sep 11 2015, 4:14 PM
jfb accepted this revision.Sep 11 2015, 5:51 PM
jfb edited edge metadata.

lgtm

This revision was automatically updated to reflect the committed changes.