llvm-project/llvm/lib/Transforms/InstCombine
Eli Friedman accc6b5545 LoadInst should store Align, not MaybeAlign.
The fact that loads and stores can have the alignment missing is a
constant source of confusion: code that usually works can break down in
rare cases.  So fix the LoadInst API so the alignment is never missing.

To reduce the number of changes required to make this work, IRBuilder
and certain LoadInst constructors will grab the module's datalayout and
compute the alignment automatically.  This is the same alignment
instcombine would eventually apply anyway; we're just doing it earlier.
There's a minor risk that the way we're retrieving the datalayout
could break out-of-tree code, but I don't think that's likely.

This is the last in a series of patches, so most of the necessary
changes have already been merged.

Differential Revision: https://reviews.llvm.org/D77454
2020-05-14 13:19:21 -07:00
..
CMakeLists.txt [InstCombine] Negator - sink sinkable negations 2020-04-21 22:00:23 +03:00
InstCombineAddSub.cpp [InstCombine] Negator - sink sinkable negations 2020-04-21 22:00:23 +03:00
InstCombineAndOrXor.cpp [InstCombine] matchOrConcat - match BITREVERSE 2020-05-10 16:00:29 +01:00
InstCombineAtomicRMW.cpp [NFC] Modernize misc. uses of Align/MaybeAlign APIs. 2020-04-06 17:53:04 -07:00
InstCombineCalls.cpp LoadInst should store Align, not MaybeAlign. 2020-05-14 13:19:21 -07:00
InstCombineCasts.cpp [InstCombine] fold fpext into exact integer-to-FP cast 2020-05-10 07:04:54 -04:00
InstCombineCompares.cpp [InstCombine] generalize canonicalization of masked equality comparisons 2020-04-25 11:31:57 -04:00
InstCombineInternal.h [InstCombine] clean up foldItoFPtoI; NFC 2020-05-08 12:13:42 -04:00
InstCombineLoadStoreAlloca.cpp LoadInst should store Align, not MaybeAlign. 2020-05-14 13:19:21 -07:00
InstCombineMulDivRem.cpp [SVE] Fix invalid usage of getNumElements() in InstCombineMulDivRem 2020-05-05 15:19:01 -07:00
InstCombineNegator.cpp [InstCombine] Negator: 'or' with no common bits set is just 'add' 2020-04-28 19:16:32 +03:00
InstCombinePHI.cpp LoadInst should store Align, not MaybeAlign. 2020-05-14 13:19:21 -07:00
InstCombineSelect.cpp [InstCombine] use select-of-constants with set/clear bit mask patterns 2020-05-03 09:44:43 -04:00
InstCombineShifts.cpp [SVE] Update API ConstantVector::getSplat() to use ElementCount. 2020-03-12 13:22:41 -07:00
InstCombineSimplifyDemanded.cpp [InstCombine][SVE] Fix visitInsertElementInst for scalable type. 2020-05-07 12:44:52 -07:00
InstCombineTables.td
InstCombineVectorOps.cpp [InstCombine] canonicalize bitcast after insertelement into undef 2020-05-10 11:37:47 -04:00
InstructionCombining.cpp [NewPassManager] Add assertions when getting statefull cached analysis. 2020-05-13 12:38:38 -07:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00