summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/ConstantFolding/gep-alias.ll
Commit message (Collapse)AuthorAgeFilesLines
* Fix pointer width in test from r366754.Peter Collingbourne2019-07-221-2/+2
| | | | llvm-svn: 366764
* Analysis: Don't look through aliases when simplifying GEPs.Peter Collingbourne2019-07-221-0/+17
It is not safe in general to replace an alias in a GEP with its aliasee if the alias can be replaced with another definition (i.e. via strong/weak resolution (linkonce_odr) or via symbol interposition (default visibility in ELF)) while the aliasee cannot. An example of how this can go wrong is in the included test case. I was concerned that this might be a load-bearing misoptimization (it's possible for us to use aliases to share vtables between base and derived classes, and on Windows, vtable symbols will always be aliases in RTTI mode, so this change could theoretically inhibit trivial devirtualization in some cases), so I built Chromium for Linux and Windows with and without this change. The file sizes of the resulting binaries were identical, so it doesn't look like this is going to be a problem. Differential Revision: https://reviews.llvm.org/D65118 llvm-svn: 366754
OpenPOWER on IntegriCloud