[SimplifyCFG] Fix DomTree update in `turnSwitchRangeIntoICmp` (#212006)
The original removal of `BB->Default` has been handled by
`createUnreachableSwitchDefault`.
When `OtherDest` is also unreachable, the edge should be removed.
This issue cannot be reproduced via
`-simplifycfg-require-and-preserve-domtree=1`. I just found it by
checking DT in `requestResimplify`.
[libcxx] Speed up xsgetn for always_noconv
In the always_noconv path, optimize character reads in the same way as
xsgetn.
Unlike fread, getwc has different semantics, so the same optimization
cannot be applied to wide characters. Therefore, only optimize the char
path.
[VPlan] Widen masked unit-stride consecutive accesses in VPlan. (#211315)
Extend the widenConsecutiveMemOps sub-pass to widen masked/predicated
unit-stride consecutive accesses VPlan-natively.
This requires exposing an instruction-independent
isLegalMaskedLoadOrStore in VPSelectionContext, as well as adding it to
VPCostContext. Some of the members will probably be useful for other
changes as well.
PR: https://github.com/llvm/llvm-project/pull/211315
[InstCombine] Fold icmp ptrtoaddr x, ptrtoaddr y -> icmp x, y (#211991)
Similar to the existing ptrtoint fold; this is valid, because icmp only
compares address bits. This addresses optimization regressions when
generating ptrtoaddr for pointer subtractions.
[lldb] Move GetVTableInfo to C++ language runtime (#207010)
The original PR was reverted in
https://github.com/llvm/llvm-project/pull/206816 due to a test failure
on lldb-aarch64-ubuntu.
Since I couldn't reproduce the failure, I decided to split the PR into
smaller chunks.
This is part 1/4 (the final state is on
https://github.com/Nerixyz/llvm-project/tree/refactor/common-abi-runtime-take2-4-of-4).
It moves `GetVTableInfo` and `TypeHasVTable` from the Itanium ABI
runtime to the C++ language runtime. Eventually, this will be used to
select the ABI runtime that's able to handle a vtable. For now, we
always ask and use Itanium.
[clang] fix __builtin_clear_padding not working with virtual base pointers on Windows (#211355)
Fixes https://github.com/llvm/llvm-project/issues/209787
It was an oversight that the builtin only takes care of the virtual
function table pointer but not the virtual base pointer. On Itanium
there is one pointer so it wasn't a problem but on windows msvc , this
is a problem. And the runtime test in libcxx CI was disabled in llvm 23
because we don't use trunk clang in our libcxx CI in general. and after
we flipped to llvm 24, the test started to fail on downstream (chromium)
where they use trunk clang with trunk libc++ on Windows.
We do have FileCheck test in clang test which covers this virtual case.
However, the target triple in the FileCheck under test were
`x86_64-linux-gnu` and `x86_64-windows-gnu` , which does not cover the
Windows msvc ABI. I updated the test to test `x86_64-pc-windows-msvc` in
this PR to cover that ABI.
[SCEV] Fix MSan uninitialized value in createSCEV (#211996)
In #180244 (8e76c3f0d29a), handling of Instruction::Sub in
createSCEV declared PtrLHS and PtrRHS as uninitialized local variables.
When only one side matched m_PtrToInt, the other variable remained
uninitialized. Passing it by value to GetOp copied uninitialized shadow
bytes, causing MemorySanitizer to report use-of-uninitialized-value.
Initialize PtrLHS and PtrRHS to nullptr upon declaration.
Assisted-by: Gemini
[LTO] Include debug options in legacy ThinLTO cache keys (#211474)
Legacy ThinLTO omits -mllvm options from cache keys, which can cause it
to reuse objects built with different code-generation settings.
Include these options in cache keys, matching modern ThinLTO behavior.
clang/AMDGPU: Migrate cc1 tests to subarch triples (8) (#211870)
Rewrite SemaHIP cc1 test RUN lines to the new subarch triple form,
dropping the redundant -target-cpu.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>