[LoopInterchange] Add tests for loop control values in the outer preheader (NFC) (#235520)
Add test cases where it matters whether the loop control values (the
initial and final values of the IVs) are available in the outer loop
preheader. These are corner cases where the work in #235496 changes
what loop-interchange can handle.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[clang] Fix typo in __cplusplus macro (#235489)
Found a possible typo where `__cplusplus` was written as `__cpluscplus`,
since I made the same typo while doing a search.
Corrected to `__cplusplus`, feel free to close if this wasn't a mistake
:)
[analyzer][NFC] BugReporterVisitors.h should include MemRegion.h (#235283)
BugReporterVisitors.h includes RangedConstraintManager.h but uses
nothing it declares: RangeSet, Range, ConstraintMap and
SimpleConstraintManager appear nowhere in the file. What the header
actually needs is MemRegion.h, which supplies SubRegion,
MemRegionManager and MemRegion completeness for an inline constructor;
today those arrive only by accident, transitively through
RangedConstraintManager.h -> ProgramState.h. Swapping the include for
the one that carries the used declarations makes the dependency honest
and adds a forward declaration of CallEvent in namespace clang::ento
for the one name that only needs to be incomplete.
One header needs a compensating include: Z3CrosscheckVisitor.h uses
ConstraintMap and was getting RangedConstraintManager.h through
BugReporterVisitors.h, so it now includes it directly. No translation
unit in clangStaticAnalyzerCore, clangStaticAnalyzerCheckers or
clangStaticAnalyzerFrontend required any other change.
[2 lines not shown]
[llvm-lto] Initialize targets before parseCommandLineOptions (#235523)
Target library options are registered when targets are initialized, so
llvm-lto rejects them as unknown arguments.
Reorder parseCommandLineOptions similar to llvm-lto2.
[ARM] Register the Thumb2ITBlockPass. NFC (#235521)
This was missing from the list of initialized passes, add it so that
print-after and pass options work.
[LoopInterchange] Add tests for loop control values in the outer preheader (NFC)
Add test cases where it matters whether the loop control values (the
initial and final values of the IVs) are available in the outer loop
preheader. These are corner cases where the work in #235496 changes
what loop-interchange can handle.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[GlobalISel] Move extracted constants into matcher bindings (#235510)
Move from successful local optional results in m_ICst and m_ICstOrSplat
instead of copying their values immediately before destruction. Wide
APInts can transfer their storage to the output binding.
Assisted by: GPT-6.1-Sol
[TTI] Remove unused -costmodel-reduxcost (#235517)
Added in cae8735a5465 (2013, "Costmodel: Add support for horizontal
vector reductions")
and removed by https://reviews.llvm.org/D105484
AMDGPU: Add implicit buffer pointer live-in for compute shaders (#235508)
When setting up the scratch resource for Mesa compute shaders, the
implicit buffer pointer was copied with S_MOV_B64 without being added
as a live-in, so the machine verifier reported a use of an undefined
register. Only the graphics path, which loads through the pointer,
added it. Add the live-in on both paths.
This was exposed by the new test in #235258.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[LLDB] Support transfer in local machine
A trasnfer can also happen in local machine if the src and dest are not
the same. Support local machine transfer for this case. In Linux, we
never hits this as they don't support coredump and will be bailed out
eariler.
[SelectionDAG][NFC] Move expandMODF to TargetLowering (#235010)
* Part of #230886
* Split from #233204
Move SelectionDAGLegalize::expandModf into TargetLowering::expandMODF so
target backends can share the expansion logic.
[LV] Add tests for diff checks of accesses not covering the step (NFC). (#235428)
Add a test for alias masks with a load group placed before a store,
which reorders accesses across lanes, and tests for different access
sizes in a reverse loop, with a padded type and in a nested loop.
AMDGPU: Add implicit buffer pointer live-in for compute shaders
When setting up the scratch resource for Mesa compute shaders, the
implicit buffer pointer was copied with S_MOV_B64 without being added
as a live-in, so the machine verifier reported a use of an undefined
register. Only the graphics path, which loads through the pointer,
added it. Add the live-in on both paths.
This was exposed by the new test in #235258.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[GlobalISel] Use signed APInt comparison in constant matchers (#235494)
Use APInt::isSameValue with SignedCompare in m_SpecificICst and
m_SpecificICstOrSplat. This avoids sign-extending equal-width operands
and leaves the requested value unchanged between matches.
Assisted by: GPT-6.1-Sol
[SPIRV] Constants should always live in the entry block (#234291)
Creating constants at the point of observation / use can lead, in
complex control-flow, to their referencing by previous instructions,
which yields broken MIR. This change uses the dedicated interface to
ensure that constants are always created in the entry block and thus
dominate all uses. It is mostly NFC asides from tweaking tests that were
order dependent.