InstSimplify: Fold nonnull addrspacecast of null to poison
Perform the definitional fold if the source value is null
in the default address space.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
IR: Intersect and drop the addrspacecast nonnull flag
Teach the flag-propagation controls about the nonnull flag
on addrspacecast.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
IR: Add nonnull flag to addrspacecast
Introduce the nonnull flag on the addrspacecast instruction,
asserting that the source pointer is not the null value of its
source address space. If the source is the source-address-space null
value, the result is poison.
The LangRef does not yet acknowdlege the existence of non-0 null
pointers, or null pointers for address spaces other than default,
but will "soon".
This gives the target a way to omit the runtime null check to map
between the null values. Currently AMDGPU works around the lack of
this flag by introducing the hacky llvm.amdgcn.addrspacecast.nonnull
intrinsic in a late target codegen pass.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
cat: add -A, -E and -T flags
Support cat -A, -E and -T, which are commonly used by Linux shell
scripts. -E prints a "$" at the end of each line, -T renders tabs
as ^I, and -A is equivalent to -vET.
MFC After: 1 week
Discussed with: jrtc27
Reviewed by: jrtc27, ziaee
Differential Revision: https://reviews.freebsd.org/D59250
Give the __COUNTER__ pedantic diagnostic a group (#218669)
Adding the pedantic diagnostic after supporting the extension for so
long without correctly diagnosing it is disruptive, so this gives folks
a way to disable just the `__COUNTER__` pedantic diagnostic without
losing all other pedantic diagnostics.
Fixes #196557
[SCEV] Make predicates optional in isKnownMultipleOf (NFC) (#219935)
This allows us to simplify some code in DependenceAnalysis, and brings
the routine in line with other SCEV routines.
RISCV: Pass instruction and operand index to replacePtrWithInt
The helper used the operand's parent instruction as the insertion point.
Pass the containing instruction and operand index directly so it no longer
depends on MachineOperand::getParent().
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[clang] Find conversion function templates for in-class specializations (#218316)
Allow redeclaration lookup to consider conversion function templates
allowing Clang to match an in-class specialization such as `template<>
operator int()` against a prior conversion function template
`template<class T> operator T()`.
Fixes #218261
[X86] Fix X86CmovConversion sinking volatile loads into conditional branches (#219827)
The `X86CmovConversion` pass unfolds memory operands of `CMOVrm`
instructions and sinks the resulting load into a conditionally executed
basic block. While safe for ordinary loads, doing this for a volatile
load violates the LLVM LangRef since it causes a volatile memory access
to conditionally not execute.
Fix this by not converting with hasOrderedMemoryRef is true.
Fixes #219814
clang/AMDGPU: Stop passing redundant -target-cpu to cc1
Now that the exact target is encoded in the triple's subarch field,
-target-cpu is redundant. This avoids polluting the resultant IR with
unwanted "target-cpu" attributes. The net result is the desired codegen
when compiling libraries for a major subarch and linking it into a
program compiled for a specific arch. e.g., compiling for "gfx9-generic"
would pollute the IR with "target-cpu"="gfx9-generic", so codegen
would ultimately be performed for the generic target even after
linking into the concrete gfx9 cpu. The specialization will now be
achieved by merging the triples without the linker or optimization
passes needing to fixup function attributes.
AMDGPU: Harden assumed subarch triple spelling (#219480)
Guard against values that require multiple hex digits or
don't fit in the IsaVersion struct fields.
Co-Authored-By: Claude <noreply at anthropic.com> (Claude Opus 4.8)
biology/ddocent: Deprecate
No apparent interest, and no time to continue maintaining the port.
(cherry picked from commit 49ceafd4138e09cf01510581cd13abf83052581d)