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
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
2003-08-12-InfiniteLoop.ll
2005-09-01-ArrayOutOfBounds.ll
2006-04-27-ReassociateVector.ll
2011-01-26-UseAfterFree.ll
2012-05-08-UndefLeak.ll
2012-06-08-InfiniteLoop.ll
2019-08-22-FNegAssert.ll [Reassoc] Small fix to support unary FNeg in NegateValue(...) 2019-08-23 15:49:38 +00:00
absorption.ll
add_across_block_crash.ll
basictest.ll
binop-identity.ll
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
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
erase_inst_made_change.ll
factorize-again.ll
fast-AgressiveSubMove.ll
fast-ArrayOutOfBounds.ll
fast-MissedTree.ll
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
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
fp-expr.ll Remove BinaryOperator::CreateFNeg 2020-02-27 09:06:03 -08:00
infloop-deadphi.ll
inverses.ll
keep-debug-loc.ll Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
long-chains.ll
looptest.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
matching-binops.ll
mightymul.ll
min_int.ll
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
negation1.ll
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
pointer-collision-non-determinism.ll
pr12245.ll
pr21205.ll
pr28367.ll
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
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
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
secondary.ll
shift-factor.ll [Tests] Autogen a bunch of Reassociate tests for ease of update 2019-08-01 23:30:32 +00:00
shifttest.ll
subtest.ll
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