This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Retain TBAA when narrowing loads
ClosedPublic

Authored by loladiro on Apr 11 2017, 12:21 PM.

Details

Summary

As discussed on the mailing list it is legal to propagate TBAA to loads from
smaller regions of a larger load tagged with TBAA. Do so for
(load->extractvalue)=>(gep->load) folding.

Diff Detail

Repository
rL LLVM

Event Timeline

loladiro created this revision.Apr 11 2017, 12:21 PM
loladiro updated this revision to Diff 94987.Apr 12 2017, 9:43 AM

There were a couple more of instances of the same pattern in this code.
I'll write some tests for all these cases next week (famous last words).

loladiro updated this revision to Diff 95496.Apr 17 2017, 2:50 PM

Now with testcases for the extra cases I discovered.

loladiro updated this revision to Diff 95497.Apr 17 2017, 2:50 PM

Run clang-format over the diff

sanjoy accepted this revision.Jun 24 2017, 12:48 PM

lgtm

lib/Transforms/InstCombine/InstructionCombining.cpp
2433 ↗(On Diff #95497)

Call this NL like you've used NS before?

This revision is now accepted and ready to land.Jun 24 2017, 12:48 PM
This revision was automatically updated to reflect the committed changes.