llvm-project/llvm/test/Transforms/Reassociate
Eli Friedman 4532a50899 Infer alignment of unmarked loads in IR/bitcode parsing.
For IR generated by a compiler, this is really simple: you just take the
datalayout from the beginning of the file, and apply it to all the IR
later in the file. For optimization testcases that don't care about the
datalayout, this is also really simple: we just use the default
datalayout.

The complexity here comes from the fact that some LLVM tools allow
overriding the datalayout: some tools have an explicit flag for this,
some tools will infer a datalayout based on the code generation target.
Supporting this properly required plumbing through a bunch of new
machinery: we want to allow overriding the datalayout after the
datalayout is parsed from the file, but before we use any information
from it. Therefore, IR/bitcode parsing now has a callback to allow tools
to compute the datalayout at the appropriate time.

Not sure if I covered all the LLVM tools that want to use the callback.
(clang? lli? Misc IR manipulation tools like llvm-link?). But this is at
least enough for all the LLVM regression tests, and IR without a
datalayout is not something frontends should generate.

This change had some sort of weird effects for certain CodeGen
regression tests: if the datalayout is overridden with a datalayout with
a different program or stack address space, we now parse IR based on the
overridden datalayout, instead of the one written in the file (or the
default one, if none is specified). This broke a few AVR tests, and one
AMDGPU test.

Outside the CodeGen tests I mentioned, the test changes are all just
fixing CHECK lines and moving around datalayout lines in weird places.

Differential Revision: https://reviews.llvm.org/D78403
2020-05-14 13:03:50 -07:00
..
2002-05-15-AgressiveSubMove.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2002-05-15-MissedTree.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
2002-05-15-SubReassociate.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
2002-07-09-DominanceProblem.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2003-08-12-InfiniteLoop.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2005-09-01-ArrayOutOfBounds.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2006-04-27-ReassociateVector.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2011-01-26-UseAfterFree.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2012-05-08-UndefLeak.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2012-06-08-InfiniteLoop.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2019-08-22-FNegAssert.ll [Reassoc] Small fix to support unary FNeg in NegateValue(...) 2019-08-23 15:49:38 +00:00
absorption.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
add_across_block_crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
basictest.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
binop-identity.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
canonicalize-neg-const.ll [Reassociate] try harder to convert negative FP constants to positive 2019-08-10 13:17:54 +00:00
commute.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
crash2.ll Add FNeg IR constant folding support 2019-05-05 16:07:09 +00:00
cse-pairs.ll [Reassociate] add testcases for more than 1 pairs - NFC 2020-03-19 05:21:24 -04:00
deadcode.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
erase_inst_made_change.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
factorize-again.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fast-AgressiveSubMove.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fast-ArrayOutOfBounds.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fast-MissedTree.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fast-ReassociateVector.ll [Reassociate] try harder to convert negative FP constants to positive 2019-08-10 13:17:54 +00:00
fast-SubReassociate.ll [InstCombine] reassociate fsub+fsub into fsub+fadd 2020-01-15 11:14:13 -05:00
fast-basictest.ll Remove BinaryOperator::CreateFNeg 2020-02-27 09:06:03 -08:00
fast-fp-commute.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
fast-mightymul.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fast-multistep.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
fp-commute.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fp-expr.ll Remove BinaryOperator::CreateFNeg 2020-02-27 09:06:03 -08:00
infloop-deadphi.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
inverses.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
keep-debug-loc.ll Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
long-chains.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
looptest.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
matching-binops.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
mightymul.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
min_int.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
mixed-fast-nonfast-fp.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
mulfactor.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
multistep.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
negation.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
negation1.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
no-op.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
optional-flags.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
otherops.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pointer-collision-non-determinism.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr12245.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr21205.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr28367.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr42349.ll [Reassociate] Remove bogus assert reported in PR42349. 2019-06-20 23:03:55 +00:00
propagate-flags.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
reassoc-intermediate-fnegs.ll [Reassociate] try harder to convert negative FP constants to positive 2019-08-10 13:17:54 +00:00
reassociate-catchswitch.ll Fix new reassociate-catchswitch.ll test 2019-05-08 18:39:03 +00:00
reassociate-deadinst.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
reassociate-landingpad.ll Migrate function attribute "no-frame-pointer-elim-non-leaf" to "frame-pointer"="non-leaf" as cleanups after D56351 2019-12-24 16:05:15 -08:00
reassociate_dbgvalue_discard.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
reassociate_salvages_debug_info.ll [DBG][OPT] Attempt to salvage or undef debug info when removing trivially deletable instructions in the Reassociate Expression pass. 2019-11-12 15:17:04 +00:00
repeats.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
secondary.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
shift-factor.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
shifttest.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
subtest.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
undef_intrinsics_when_deleting_instructions.ll [DBG][OPT] Attempt to salvage or undef debug info when removing trivially deletable instructions in the Reassociate Expression pass. 2019-11-12 15:17:04 +00:00
vaarg_movable.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
wrap-flags.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
xor_reassoc.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00