[CodeGen][RISCV] Inline stack probes immediately after `allocateStack` in `eliminateCallFramePseudoInstr` (#195456)
This PR adds a call to `inlineStackProbe` immediately after
`allocateStack` in `eliminateCallFramePseudoInstr`. This allows code
generation for stack probe pseudoinstructions in non-entry BBs.
Fixes #195454.
[SLP]Bail out on non-schedulable expanded binop with stale operand deps
In tryScheduleBundle's DoesNotRequireScheduling path, an expanded binop
(shl X, 1 modeled as add X, X) doubles the dependency count of the
duplicated operand. If the operand has a
single IR use yet its ScheduleData already has Dependencies populated
by an earlier calculation that did not see the expanded duplicate use,
double decrement still exceeds calculateDependencies' single increment
and UnscheduledDeps goes negative.
Fixes #196281.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/196449
[Clang][HLSL] Fix -Wunused-variable (#196445)
LookupSucceeded is only used in an assertion. Mark it [[maybe_unused]]
so we do not get -Wunused-variable in non-assertions builds.
[AMDGPU][True16] relax d16-write-vgpr32 condition (#194477)
Patch https://github.com/llvm/llvm-project/pull/157795 work around a D16
load HW issue.
We found the condition of this workaround could be relaxed for
instructions from same order groups. Downstream testing looks ok.
[DebugInfo] Remove old decls when converting DI (#194964)
We were trying to remove declarations of old debug intrinsics whenever
printing modules or writing them to file. This is no longer necessary as
we use the new-style debug values exclusively now, other than when a
target pass specifically converts back to the old style. If a target
pass does that, removing the intrinsics is not right as the intrinsics'
users will still linger.
This change should be NFC except for the experimental DirectX target
where we do exactly that.
Fixes #194884
Fix metadirective loop variant lowering
Preserve the associated DO evaluation when a dynamic metadirective can
select either a loop-associated directive or a standalone fallback, so
the fallback still lowers the original loop body.
Scope temporary loop-IV data-sharing attributes to the selected variant.
Use the selected variant's collapse clause to determine how many loop IVs
to mark, avoiding DSA state leaking between alternatives.
[PowerPC] Hardcode LDAT/LWAT_CSNE constant immediate (#196115)
The FC field in LDAT/LWAT_CSNE instructions is always 16, so hardcode it
in the TableGen definition instead of passing it as an explicit operand.
Fix metadirective loop variant lowering
Preserve the associated DO evaluation when a dynamic metadirective can
select either a loop-associated directive or a standalone fallback, so
the fallback still lowers the original loop body.
Scope temporary loop-IV data-sharing attributes to the selected variant.
Use the selected variant's collapse clause to determine how many loop IVs
to mark, avoiding DSA state leaking between alternatives.
[flang][OpenMP] Support loop-associated metadirective variants (part 3)
Enable metadirective lowering for loop-associated variants such as
`do`, `simd`, `parallel do`, and `do simd`.
When a metadirective resolves to a loop-associated directive, the
sibling DO evaluation is spliced into the metadirective's evaluation
list so existing loop lowering finds it. Loop IV data-sharing
attributes are marked at lowering time since semantic analysis cannot
know which variant will be selected. The DataSharingProcessor is also
extended to handle spliced evaluations.
This patch is part of the feature work for #188820 and stacked on top
of #194424.
Assisted with copilot and GPT-5.4
[NFCI][msan] Add test case for llvm.fptoui.sat/llvm.fptosi.sat (#196416)
Forked from llvm/test/Instrumentation/MemorySanitizer/ftrunc.ll
PR #191365 lowered NEON fcvtz[us] intrinsics into fpto[us]i.sat,
exposing a gap in MSan's instrumentation. A follow-up patch will add
support in MSan for ftop[us]i.sat, propagating the shadow (similar to
its handling of fcvtz[us]) rather than strictly handling them.
[Instrumentor] Allow printing a runtime stub (#138978)
This commit extends the Instrumentor with the option
`configuration.runtime_stubs_file` to generate a runtime stub file with
the configured instrumentation. The stub prints all parameters passed to
each enabled instrumentation function.
[NewPM] Port for AArch64SLSHardening (#196378)
AArch64.h: Declared the AArch64SLSHardeningPass class.
AArch64PassRegistry.def: Registered the pass under the name
aarch64-sls-hardening.
AArch64SLSHardening.cpp: Implemented the run method to bridge the NewPM
with the existing pass logic, ensuring MachineModuleAnalysis is
correctly retrieved.
[clang][RISCV] Remove some of the bits added with RISC-V big endian support (#192903)
- FreeBSD will not have any new 32-bit archs
- *BSD's are unlikely to touch BE RISC-V
- Keep the BE and LE targets separate
[CIR] Implement weak ref and alias attribute handling (#195972)
This adds handling for globals with the WeakRefAttr (not emitted) or
AliasAttr attributes set. CIR already had support for function aliases,
but we weren't handling the explicit alias attribute, and we didn't have
any support for global variable aliases. This change adds the global
variable alias support and adds the code to handle the explicit
attribute for variables and functions.
Assisted-by: Cursor / claude-opus-4.7-thinking-xhigh
Fix PowerPC test failure from [AsmWriter] Change the output syntax of floating-point literals. (#196407)
The root cause of the failure is that the output syntax only outputs the
+/-snan syntax for ppc_fp128 if the trailing double is 0. The clang test
here is triggering -LDBL_SNAN, which is actually an fneg(snan constant),
and the fneg causes the signs of both doubles in the ppc_fp128 to flip.
As a result, only the ppc_fp128 form is output in the hexadecimal format
rather than the -snan format, necessitating a change to the test output.
[VPlan] Directly use masks on recipes in dropPoisonGen (#193978)
dropPoisonGeneratingRecipes currently uses a convoluted and incorrect
logic to determine whether a recipe is masked. Use the masks that are
set on the recipes directly instead.