[ValueTracking] Look through constant exprs in aggregate constants (#230487)
For a pointer to member function on AArch64, Clang emits a frozen two
element array. The first element is the function pointer and the second
is the this-adjustment, whose low bit marks the function as virtual:
```
%func.coerce = freeze [2 x i64] [i64 ptrtoint (ptr @fun to i64), i64 0]
```
isGuaranteedNotToBeUndefOrPoison() returns false for any aggregate
constant that contains a ConstantExpr, even when the expression cannot
produce undef or poison, as with ptrtoint of a function. As a result
InstCombine cannot drop the freeze, and the test of the virtual bit,
together with both the virtual and non-virtual paths, survives the
middle end.
On AArch64, aarch64-copyelim later removes the test, but the blocks for
the virtual call remain as dead code (.LBB0_6, .LBB0_8) in
https://godbolt.org/z/YKjqrnvE4).
[AMDGPU] Return double from shaders in VGPRs, not SGPRs (#233373)
f32 should be assigned to VGPRs from the `RetCC_SI_Shader` definition,
but f64 is being assigned to two i32 registers, which end up being
assigned to SGPRs. Also, since #135326, it was being lowered through
`v_readfirstlane_b32` into `s[0:1]`. This check should be extended for
double.
Assisted-by: [Claude](https://claude.com/claude-code)
---------
Signed-off-by: Keshav Vinayak Jha <keshavvinayakjha at gmail.com>
[AArch64][TTI] Cost the Ands of a NEON bit select as free
Or(And(M, A), And(Not(M), B)) selects to a single BSL/BIT/BIF. Charge the
Or and treat the single-use Ands in its block as free, using the matcher
shared with operand sinking.
devel/llvm14: remove FLANG and MLIR from the default build
It would be surprising if anyone was using these ancient versions so
stop wasting build time for most people.
devel/llvm14: remove FLANG and MLIR from the default build
It would be surprising if anyone was using these ancient versions so
stop wasting build time for most people.
devel/llvm14: Remove the LLDB option and fix plist with DOCS
LLDB's Python script interpreter fails to build with Python 3.13
(_Py_IsFinalizing was removed), which blocks switching the default
Python version to 3.13. Rather than patching an old debugger, remove
the LLDB option as discussed in PR 292105: LLDB remains available
from devel/llvm18 and later and from the base system.
This also drops the swig build dependency and the lua53 and libedit
library dependencies.
While here, fix the plist with DOCS enabled: the openmp and flang
HTML documentation leaves an empty _sources directory behind, and
check-plist fails with orphaned directories. Remove them;
devel/llvm12 does the same for openmp (a4f732450dd3).
PR: 299422
devel/llvm14: Remove the LLDB option and fix plist with DOCS
LLDB's Python script interpreter fails to build with Python 3.13
(_Py_IsFinalizing was removed), which blocks switching the default
Python version to 3.13. Rather than patching an old debugger, remove
the LLDB option as discussed in PR 292105: LLDB remains available
from devel/llvm18 and later and from the base system.
This also drops the swig build dependency and the lua53 and libedit
library dependencies.
While here, fix the plist with DOCS enabled: the openmp and flang
HTML documentation leaves an empty _sources directory behind, and
check-plist fails with orphaned directories. Remove them;
devel/llvm12 does the same for openmp (a4f732450dd3).
PR: 299422
devel/llvm13: remove FLANG and MLIR from the default build
It would be surprising if anyone was using these ancient versions so
stop wasting build time for most people.
devel/llvm13: remove FLANG and MLIR from the default build
It would be surprising if anyone was using these ancient versions so
stop wasting build time for most people.
devel/llvm13: Remove the LLDB option and fix plist with DOCS
LLDB's Python script interpreter fails to build with Python 3.13
(PyEval_ThreadsInitialized was removed), which blocks switching the
default Python version to 3.13. Rather than patching an old debugger,
remove the LLDB option as discussed in PR 292105: LLDB remains available
from devel/llvm18 and later and from the base system.
This also drops the swig build dependency and the lua53 and libedit
library dependencies.
While here, fix the plist with DOCS enabled: the openmp and flang
HTML documentation leaves an empty _sources directory behind, and
check-plist fails with orphaned directories. Remove them;
devel/llvm12 does the same for openmp (a4f732450dd3).
PR: 299421
devel/llvm13: Remove the LLDB option and fix plist with DOCS
LLDB's Python script interpreter fails to build with Python 3.13
(PyEval_ThreadsInitialized was removed), which blocks switching the
default Python version to 3.13. Rather than patching an old debugger,
remove the LLDB option as discussed in PR 292105: LLDB remains available
from devel/llvm18 and later and from the base system.
This also drops the swig build dependency and the lua53 and libedit
library dependencies.
While here, fix the plist with DOCS enabled: the openmp and flang
HTML documentation leaves an empty _sources directory behind, and
check-plist fails with orphaned directories. Remove them;
devel/llvm12 does the same for openmp (a4f732450dd3).
PR: 299421
[AMDGPU] Ignore debug instructions in early termination lowering (#233012)
SILateBranchLowering checks the instruction immediately after
SI_EARLY_TERMINATE_SCC0 when deciding whether to split the block. A
debug instruction at the end of the block or before an existing
terminator can therefore create an unnecessary continuation block and
make the CFG depend on debug information.
Look past debug instructions for the split decision. When no split is
needed, move them before the generated branch to keep the terminator
sequence valid. When an ordinary instruction follows, leave them in the
continuation block.
The MIR coverage includes trailing debug instructions, debug
instructions before an existing terminator, and debug instructions
before an ordinary instruction.
[flang][OpenMP] Switch clause verification to descriptor-based
Delete all the scattered pieces of clause verification that are now
replaced by the unified handling.