HomePhabricator

[Inline] Fix incorrect noalias metadata application (PR48209)

Authored by nikic on Wed, Nov 18, 11:48 AM.

Description

[Inline] Fix incorrect noalias metadata application (PR48209)

The VMap also contains a mapping from Argument => Instruction,
where the instruction is part of the original function, not the
inlined one. The code was assuming that all the instructions in
the VMap were inlined.

This was a pre-existing problem for the loop access metadata, but
was extended to the more common noalias metadata by
27f647d117087ca11959e232e6443f4aee31e966, thus causing miscompiles.

There is a similar assumption inside CloneAliasScopeMetadata(), so
that one likely needs to be fixed as well.

Details

Committed
nikicWed, Nov 18, 11:52 AM
Parents
rGb51c290663cf: [Inline] Add test for PR48209 (NFC)
Branches
Unknown
Tags
Unknown