[NFC][PowerPC] fix IR to be splat and not zeroinitializer (#174699)
IR should be a splat of 7 as this compares vector of elements with 7
(`vec[i]!=7`). Having `zeroinitializer` goes against this comparison.
Co-authored-by: himadhith <himadhith.v at ibm.com>
Use statmount and listmount for sysdataset plugin
This commit adds some minor improvements to the system dataset
plugin to use optimized syscalls to get mount information.
[bazel] Make CAPIIR depend on TransformsPassIncGen (#174902)
CAPIIR includes this in some of its source files, so we need to ensure
the header is around.
[RISCV] Fold (fma (splat (fneg X)), Y, Z) -> (fma (fneg (splat X)), Y, Z) (#173808)
We use fli+fneg to generate negative float, eliminate the fneg for fma.
Fold fma to vfnmsac.vf,vfnmsub.vf, vfnmacc.vf, vfnmadd.vf
---------
Co-authored-by: Craig Topper <craig.topper at sifive.com>
[SPIRV] Handle aggregate arguments to `spv_store` (#172348)
This patch handles the special case where an extract value yields an
aggregate result, which then is used as an argument to a store. The
SPIRV BE uses special intrinsics (`spv_extractv` and `spv_store`) to
represent these through IRTranslator, however this creates a problem:
`spv_store` is called as a function, and IRTranslator cannot handle
arguments that take more than a vreg. For other functions, the aggregate
argument replacement pass would have solved things, but it does not
apply here. Hence, we apply the same mutate-into-Int32 solution here
when dealing with stores, and restore the extract value's type (which we
have available as a ValueAttr) during instruction selection.
avoid small reads when there's a preferred IO size.
a discussion on port-sparc here:
https://mail-index.netbsd.org/port-sparc/2025/12/29/msg003063.html
showed that the "file type" 4-byte read was failing on tape devices
as they need a specific IO size to work.
since we already pass this 4 bytes to the real decompressor, avoid this
problem by checking if there's a st_blksize value from stat(2) and use
a buffer of that size for the first read.
rename handle_stdin() to handle_fd_decomp() and use the same backend
for stdin as well as readable non-file files (device, fifo, socket).
tested by Nobuyoshi SATO on port-sparc, atf, and a few other manual
things.
[WebAssembly] Fold constant `i8x16.swizzle` and `i8x16.relaxed.swizzle` to `shufflevector` (#169110)
Resolves #169058.
This adds ~~an InstCombine pass~~ a TTI hook to the WebAssembly backend
that folds `i8x16.swizzle` and `i8x16.relaxed.swizzle` operations to
`shufflevector` operations if their mask operands are constant.
This is mainly useful for abstractions over the raw intrinsics--for
instance, in architecture-generic SIMD code that may not be able to
expose the constant shuffles due to type system limitations.
I took most of this from the x86 backend (in particular,
`simplifyX86vpermilvar` in `X86InstCombineIntrinsic`), and adapted it
for the WebAssembly backend. There wasn't any previous
`instCombineIntrinsic` method on the WebAssembly `TargetTransformInfo`,
so I added it. Right now, this swizzle optimization is the only one it
performs.
[16 lines not shown]
[mlir][vector] Emit error when `kind` attribute is not a CombiningKind (#173659)
This PR fixes a crash by validating the type of the `kind` attribute.
For `vector.contract` and `vector.outerproduct`, the verifier now emits
an error when `kind` is not a CombiningKindAttr. Fixes #173555.
[RISC-V] Ensure MCTargetStreamer is initialized. (#174800)
Fixes a failure on llc for ubsan builds:
../lib/Target/RISCV/RISCVAsmPrinter.cpp:552:7: runtime error: downcast
of null pointer of type 'RISCVTargetStreamer'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
../lib/Target/RISCV/RISCVAsmPrinter.cpp:552:7
[flang] Make fir.result Pure operation. (#173508)
This allows speculating recursively speculatable operations
containing `fir.result`. Note that making it Pure does not allow
speculating `fir.result` itself from its containing operation,
since it is a terminator.
[LLVM][NVPTX] Enable family specific support for a few intrinsics (#173268)
This commit adds support for family specific support for the following
intrinsics:
- ldmatrix
- stmatrix
- mma.block_scale, mma.sp.block_scale
- redux.sync
- cvt.rs
- clusterlaunchcontrol
- setmaxnreg
- tcgen05.mma
Removed `hasTcgen05Instructions` function in the favour of `hasTcgen05InstSupport` Updated wmma.py script with family specific support and added new tests
NAS-139212 / 26.04 / use statx provided by truenas_pyos (#17972)
This commit removes the ctypes definition for statx and replaces with
the implemntatoin from truenas_pyos (cpython).