1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/Analysis/ConstantFolding
Peter Collingbourne dc614179c3 Analysis: Don't look through aliases when simplifying GEPs.
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
2019-07-22 22:13:46 +00:00
..
bitcount.ll [ConstantFolding] Fold undef for integer intrinsics 2019-01-11 21:18:00 +00:00
cast-vector.ll
fneg.ll Add FNeg support to InstructionSimplify 2019-05-06 16:05:10 +00:00
funnel-shift.ll [ConstantFolding] Fold undef for integer intrinsics 2019-01-11 21:18:00 +00:00
gep-alias.ll Analysis: Don't look through aliases when simplifying GEPs. 2019-07-22 22:13:46 +00:00
gep-constanfolding-error.ll
gep-zeroinit-vector.ll
gep.ll Prevent Constant Folding From Optimizing inrange GEP 2018-09-11 01:53:36 +00:00
min-max.ll [ConstantFolding] Constant fold minimum and maximum intrinsics 2018-10-19 18:15:32 +00:00
saturating-add-sub.ll [ConstantFolding] Fold undef for integer intrinsics 2019-01-11 21:18:00 +00:00
smul-fix-sat.ll [ConstantFolding] Add constant folding for smul.fix and smul.fix.sat 2019-06-19 14:28:03 +00:00
smul-fix.ll [ConstantFolding] Add constant folding for smul.fix and smul.fix.sat 2019-06-19 14:28:03 +00:00
timeout.ll
vector-undef-elts.ll
vectorgep-crash.ll