[Clang][test] Fix leading slash (#200549)
A reviewer in #200012 required checking for a leading (back-)slash to
the test despite none of the other tests doing so. Turns out, the slash
isn't there if the driver is unable to resolve the full path to the
linker. Remove the leading slash from the test.
Fixes reported buildbot failures:
* clang-solaris11-sparcv9
* clang-solaris11-amd64
Validate size of chunks copied to piglet during hibernate unpack
Ensure that the compressed size of the chunk read from the hibernate image
will fit into the reserved space in the piglet for such chunks. Prevents
chunks with invalid sizes from overrunning the piglet. Such corrupted
chunks could be present in tampered or corrupt on-disk hibernate images.
Reported by Frank Denis
[MergeICmps] Don't merge comparisons whose width isn't a byte multiple (#200346)
MergeICmps looks for cases like
struct S { char x; char y; }
A.x == B.x && A.y == B.y
If `x` and `y` are stored adjacent to one another, we can convert the
above into a memcmp, which can then be converted into a single 16-bit
compare.
This pass currently does the wrong thing if the struct members' sizes
are not multiples of 8 bits. To fix this, we simply bail if the elements
in question are not multiples of one byte.
This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
[LICM] Drop poison-generating flags when reassociating an icmp (#200344)
`hoistAdd`/`hoistSub` turn `LV + C1 <pred> C2` into `LV <pred> C2 - C1`,
changing the icmp's LHS. A `samesign` flag asserted about the old
operands need not hold for the new LHS, so keeping it can turn a defined
comparison into poison (e.g. for `%iv = -3`, `samesign slt(2, 100)` is
true but the reassociated `samesign slt(-3, 95)` has
opposite-sign operands → poison). Drop the icmp's poison-generating
flags after the rewrite, as `hoistMulAddAssociation` already does.
This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply at anthropic.com>
[SelectionDAG] Preserve IR alignment on atomicrmw/cmpxchg MMOs (#200332)
Previously SelectionDAG used the natural alignment of the value type,
even if the instruction specified a different alignment.
This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
Validate sizes against integer overflow when reading chunks in unhibernate
Validate that chunk sizes stored in the chunktable don't result in integer
overflow. Such invalid chunk sizes could be present in tampered or corrupt
on-disk hibernate images.
Reported by Frank Denis
Revert "[X86] matchBinaryPermuteShuffle - match to X86ISD::SHLD funnel shift patterns" (#200546)
Reverts llvm/llvm-project#200136 while I investigate a miscompilation report
[Flang][OpenMP] Reject array sections and subobjects in LINEAR clause (#197430)
Array sections like a(:,1,1) and array elements like a(1) in a LINEAR
clause cause a crash during MLIR-to-LLVM IR translation because the
semantic checker doesn't catch them.
This adds a call to CheckVarIsNotPartOfAnotherVar for the LINEAR clause,
which is the same check used by PRIVATE and FIRSTPRIVATE to reject
subobject designators.
Fixes :
[https://github.com/llvm/llvm-project/issues/196068](https://github.com/llvm/llvm-project/issues/196068)
Co-authored-by: Chandra Ghale <ghale at pe34genoa.hpc.amslabs.hpecorp.net>
[Flang][Parser] Handle compiler directives inside INTERFACE blocks (#198516)
Unrecognized !DIR$ directives between interface specifications currently
cause cascading parse errors because the grammar for
InterfaceSpecification has no path to consume them. This patch adds
CompilerDirective as a valid alternative — matching how
InternalSubprogram and ModuleSubprogram already handle this — so that
unrecognized directives produce the expected warning instead of a fatal
parse failure.
Fixes :
[https://github.com/llvm/llvm-project/issues/198289](https://github.com/llvm/llvm-project/issues/198289)
---------
Co-authored-by: Chandra Ghale <ghale at pe34genoa.hpc.amslabs.hpecorp.net>
Prevent overread when reading the chunktable in unhibernate
Ensure we don't read past the end of the chunktable, which could happen
with a tampered or corrupted on-disk hibernate image.
Reported by Frank Denis
textproc/openvpn-status-parser: new port had been added (+)
Go application that parses OpenVPN status files and exports
data in JSON or OpenMetrics (Prometheus) format.
Requested by: author/maintainer
[SelectionDAG] Remove redundant asserts in WidenVecRes_ATOMIC_LOAD (#200159)
These asserts duplicate guarantees already provided elsewhere:
- `isVector()` checks are redundant because `findMemType()` calls
`WidenVT.getVectorElementType()` and `WidenVT.isScalableVector()`
internally, and `WidenVecRes_ATOMIC_LOAD` is only reached from the
`ATOMIC_LOAD` case in `WidenVectorResult`, which is the vector path.
- The element-type and scalability consistency between `LdVT` and
`WidenVT` is a property of `GetWidenedVector` / `getTypeToTransformTo`.
Follow-up to feedback on #197618.
[CIR][CodeGen] Replace errorNYI with assert for address space in emitAutoVarAlloca (#197506)
Auto variables can only be in the default address space, or
opencl_private when compiling OpenCL. Replace the errorNYI with an
assert matching OG codegen (CGDecl.cpp).
Fixes part of #160386
Co-authored-by: Andy Kaylor <akaylor at nvidia.com>
[lldb][Windows] Cache thread context in NativeRegisterContextWindows_arm64 (#197385)
Cache thread context in _NativeRegisterContextWindows_arm64_ to improve
read performance. Previously, the thread context was retrieved for every
read or write operation.
This change intends to lay the groundwork for provisioning debug support
for SVE on WoA.
Assisted-by: Claude Sonnet 4.6