[Polly] Add null pointer check before size retrieval (#174309)
This patch avoids assertion failures by ensuring a null pointer check is
performed before accessing the object's size.
Note: The corresponding test case remains too large even after
reduction, so it has not been included in this patch.
Fixes #174147
[X86] Ensure a (vXi1 bitcast(iX Mask)) memory mask is canonicalised for extension before it might get split by legalisation (#175769)
Masked load/store/gathers often need to bitcast the mask from a
bitcasted integer.
On pre-AVX512 targets this can lead to some rather nasty scalarization
if we don't custom expand the mask first.
This patch uses the canonicalizeBoolMask /combineToExtendBoolVectorInReg
helper functions to canonicalise the masks, similar to what we already
do for vselect expansion.
Alternative to #175385
Fixes #59789
[llvm-objdump][test] Remove dead MachO LLVM-bundle test (#172786)
This test has been permanently unsupported since eb601430d3d7 removed
libxar support and the xar feature from lit.cfg.py in October 2023.
[CIR] Add additional NYI checks for SVE builtins (#175575)
This change extends the NYI checks recently introduced in #174433 by
adding further validation of SVE builtin type modifiers. For example:
```cpp
SVETypeFlags typeFlags(builtinIntrInfo->typeModifier);
// Unsupported flag — bail out
if (typeFlags.someFlag())
cgm.errorNYI();
```
The newly added checks mirror the logic in
CodeGen/TargetBuiltins/ARM.cpp, specifically in:
* `CodeGenFunction::EmitAArch64SVEBuiltinExpr`,
which defines the default code-generation path for SVE builtins.
[2 lines not shown]
[CIR] Proper lowering of atomic sync scope to LLVM (#173393)
This patch sets up a framework to properly lower atomic sync scopes from
CIR to LLVM. Since the lowering is target-specific, this patch first
upstreams a minimum implementation of the TargetLoweringInfo class. It
then adds a virtual function there to handle the lowering of atomic sync
scopes in a target-specific way.
[mlir][SPIRV] Move getDecorationString to SPIRVEnums utilities (NFC). (#174222)
Moves the getDecorationString() helper from the conversion layer's
SPIRVCommon/Pattern.h to the public SPIRVEnums.h header. This makes the
utility accessible to both the SPIRV dialect and conversion layers,
following proper architectural layering.
This continues the refactoring started in #174145.
[X86] isHorizontalBinOp - discard any shuffle that resolves to an all sentinel shuffle mask (#175931)
If the mask resolves to all-undef/zero then it can't be used - these can
theoretically appear if we're combining before the source operands have
constant folded away (in this case due to the avg intrinsic not folding
away until later into legalisation) - yet another case of working around
a poorly topological sorted DAG
Fixes #175802
[analyzer] Invalidate the object in opaque ctor calls regardless if an arg refers to it (#170887)
The conservative call invalidation logic is a bit complicated, and would
deserve some refactoring.
When a call has some arguments, we escape them. Except, if its a pointer
to constant storage - because we assume that the program honors
const-correctness.
In that case, it puts it in the "Preserved" list to keep its contents.
However, if we had a constructor call that's job is to initialize an
object had a const pointer/reference parameter then the invalidation
didn't take place.
This meant that if the object was on the stack, that we start warning
about uninitialized fields when accessed. (See the example) Similar
could be achieved on the heap of course.
We should have honored the fact that the constructor should initialize
[7 lines not shown]
[Metadata][profcheck] Handle identical MDNodes in getMergedProfMetadata
This fixes a bug where !prof metadata was dropped from SelectInsts when GVN simplified/merged them.
Guarded by -profcheck-disable-metadata-fixes. Exposed by the tests in
Transforms/SampleProfile.
[AArch64] Add lowering for NEON saturating shift intrinsics (#171485)
This patch extends on the work done in #161840 and adds lowering with
bitcasts for saturating shift intrinsics.