[RISCV] Don't make ISD::ABDS/ABDU legal for v2i32 with P extension. (#184753)
We don't have the instructions for this so it causes a cannot select
error.
[mlir][memref] Fix crash in DimOp::fold for subview with ambiguous dropped dims (#183995)
When a rank-reducing subview has multiple size-1 source dimensions and
all strides are dynamic, `computeMemRefRankReductionMask` cannot
unambiguously determine which dimension is dropped. It would fall back
to an arbitrary choice that could be wrong.
In `DimOp::fold`, the code then maps a result dimension to that
(possibly incorrect) source dimension and asserts
`isDynamicSize(sourceIndex)`. If `getDroppedDims()` picked the wrong
dropped dim, the source dim at `sourceIndex` may be statically sized,
causing the assertion to fire.
Fix this by replacing the assert with a guard that returns `{}` (no
fold) when the resolved source dimension is not dynamic. This is safe
because the fold already handles the statically-sized result case
earlier.
Fixes #111244
Assisted-by: Claude Code
[flang] Fix distribution build of `ISO_Fortran_binding.h` to also install it in `CMAKE_INSTALL_INCLUDEDIR`. (#184284)
Currently with `-DLLVM_DISTRIBUTION_COMPONENTS="flang-fortran-binding"`,
header file `ISO_Fortran_binding.h` is only installed at
`./lib/clang/23/include/ISO_Fortran_binding.h`, but not in the user
include.
This PR is to fix that so that the `ISO_Fortran_binding.h` is also
installed at `./include/flang/ISO_Fortran_binding.h`, which is the same
as the "normal" (non-distribution) build.
COFF: Allow hex literals in .def files: BASE/HEAPSIZE/STACKSIZE (#184764)
For a Win32 DLL, a .def file can have a custom executable base:
```
LIBRARY "stub.dll" BASE=0x10000000
```
Currently the parser enforces Base 10, but [Microsoft's
documentation](https://learn.microsoft.com/en-us/cpp/build/reference/rules-for-module-definition-statements?view=msvc-170)
states "Numeric arguments are specified in base 10 or hexadecimal".
This fixes that, and also HEAPSIZE and STACKSIZE (which use the same
function).
There are a few more instances of `getAsInteger` that expect base10 -
for ordinals and the VERSION directive. Since I don't have an
in-the-wild example of a .def file using hexadecimal for these, I am
wary about changing those too.
fixup! Move code to `AArch64ExpandPseudoInsts` and `getTgtMemIntrinsic`
Move code to `AArch64ExpandPseudoInsts` and `getTgtMemIntrinsic`
and use tablegen pattern for intrinsic, plus other small review changes.