[libc++] Remove benchmark::DoNotOptimize from custom predicates in benchmarks (#208412)
The point of the custom predicates is to defeat any detection of special
predicates within the library. There isn't much point in adding
`benchmark::DoNotOptimize` on top of that. It can actually hurt, since
it may hide performance changes due to how much/which information we
provide to the compiler.
[flang][MIF] Fix COSHAPE and THIS_IMAGE(coarray) type mismatch for non-i64 kinds (#208429)
Both COSHAPE and THIS_IMAGE(coarray [,team]) return integer arrays whose
element type is determined by the Fortran KIND argument (default: i32).
The lowering code was ignoring resultType in both cases and hardcoding
i64, which caused downstream type mismatches:
- COSHAPE: SimplifyHLFIRIntrinsics assertion in PRODUCT(COSHAPE(y)) when
the product input type (i64) did not match the declared result type
(i32).
- THIS_IMAGE(coarray): MLIR verifier error on arith.cmpi with mismatched
operand types (i64 vs i32) in comparisons like THIS_IMAGE(a) /=
[5,0,-7].
Fix: derive eleTy from resultType in both genCoshape and genThisImage
and propagate it into the mif.* op's result type. In MIFOpConversion,
extract a shared convertI64SeqToEleTy helper that post-converts the i64
scratch buffer written by the PRIF runtime into the
declared-element-type buffer when the two types differ. Both
[2 lines not shown]
Revert "[LLVM][NFC] Remove some global constructors" (#208494)
Breaks some buildbots with gcc. Looks like constexpr member definitions
need an extern for old gcc otherwise they get local linkage...
Reverts llvm/llvm-project#208407
[WebAssembly] Don't use passive segments for bss in coop threads (#208284)
This commit is an update to `wasm-ld`'s behavior with bss data segments
with `--cooperative-threading`. Previously bss segments were forced to
become passive data segments meaning that a `start` function was emitted
with a `memory.fill` that set the required region of memory to 0. This
isn't required for coop threads though because the module is only
instantiated once and the default pattern for memory is 0, so only
special treatment of TLS segments are required.
[libc++] Fix assign_range test for forward_list (#208283)
That test was checking prepend_range instead of assign_range due to a
copy-paste error.
Fixes #74536
[libc++][NFC] Rename forward_list constructor tests (#208301)
The forward_list tests historically used "range" to mean an iterator
pair, but we use `iter_iter` pretty consistently elsewhere in the test
suite. Using `range` also makes it confusing with the actual tests for
`_range` operations, like `append_range` or `assign_range`.
audio/lame: fix build (missing pkgconfig)
It did build fine in my poudriere, but not in the poudriere of others.
PR: 296643
Submitted by: Eric Camachat <eric at camachat.org>
Noticed by: Einar Bjarni Halldórsson <einar at isnic.is>
[VectorCombine] Handle widening/narrowing bitcasts in foldShuffleToIdentity (#187870)
Track lane indices through vector bitcasts that change element count in
foldShuffleToIdentity. Widening bitcasts (e.g. <2 x i32> -> <4 x i16>)
compress R consecutive destination lanes into one source lane, while
narrowing bitcasts (e.g. <4 x i16> -> <2 x i32>) expand each destination
lane into R source lanes.
Also fix identity check, splat mask, and destination type construction
to use Item.size() instead of Ty->getNumElements(), since the Item
vector changes size when passing through element-count-changing
bitcasts.
Fixes #96884
[lldb][Windows][CI] split steps (#206946)
Split the lldb green-dragon lldb testing steps into 2:
1. Build and run the tests without `lldb-server.exe`
2. Run the tests with `lldb-server.exe`
This gives better separation in the UI and if the first step fails, the
second step will still attempt to run.
[CIR][AArch64] Lower NEON vfms builtins (#207022)
Lower additional AArch64 NEON fused multiply-subtract builtins in CIR.
This covers the ACLE wrappers from section 2.1.1.2.5:
- vfms_f32, vfms_f64, vfmsq_f32, vfmsq_f64
- vfms_lane_f32, vfms_lane_f64, vfmsq_lane_f32, vfmsq_lane_f64
- vfms_laneq_f32, vfms_laneq_f64, vfmsq_laneq_f32, vfmsq_laneq_f64
- vfmss_lane_f32, vfmss_laneq_f32
- vfmsd_lane_f64, vfmsd_laneq_f64
The lowering reuses the existing FMA paths by negating the multiply
operand before emitting llvm.fma. Vector lane forms splat the selected
lane, while scalar lane/laneq forms extract the selected element before
the FMA.
Move the existing ACLE coverage into
clang/test/CodeGen/AArch64/neon/fused-multiply.c and add direct LLVM,
CIR-to-LLVM, and CIR checks. The replaced old-style checks are removed
[2 lines not shown]
[compiler-rt][memprof] fix off-by-one in shadow access-count accumula… (#208376)
…tion.
GetShadowCount and GetShadowCountHistogram used an inclusive loop up to
MEM_TO_SHADOW(p + size), summing an extra adjacent cell when p + size is
granule-aligned. Use p + size - 1 to stay within the allocation.
[CodeGen] Disable exact dynamic_cast for duplicable vtables (#205929)
Add `TargetInfo::getVTableUniqueness()`, which returns a
`VTableUniquenessKind` that describes whether a target's ABI guarantees
a class's vtable has a single address program-wide. Apple Mach-O targets
return `UniqueIfStrongLinkage`, since a vague-linkage (weak) vtable may
be autohidden and duplicated per image, while a vtable with strong
linkage (e.g., a class with a key function) still has a unique address.
Every other target keeps the default, `AlwaysUnique`.
Rename the `CodeGenOpts` flag backing `-f[no-]assume-unique-vtables`
from `AssumeUniqueVTables` to `DisableExactDynamicCast`, defaulting to
false so the optimization stays on unless `-fno-assume-unique-vtables`
is given. Use it together with `getVTableUniqueness()` in
`ItaniumCXXABI::hasUniqueVTablePointer()` so a weak vtable on a target
that may duplicate vtables no longer qualifies for the exact
`dynamic_cast` optimization; a vtable with a key function, or any vtable
on a target with `AlwaysUnique` semantics, is unaffected.
[2 lines not shown]