[Mlir-commits] [mlir] [mlir][gpu] Harden verification constraints in `transform.gpu.map_nested_forall_to_threads` (PR #170282)
Akimasa Watanuki
llvmlistbot at llvm.org
Mon Mar 2 19:27:09 PST 2026
================
@@ -141,12 +141,14 @@ std::optional<int64_t> getConstantIntValue(OpFoldResult ofr) {
std::optional<SmallVector<int64_t>>
getConstantIntValues(ArrayRef<OpFoldResult> ofrs) {
bool failed = false;
- SmallVector<int64_t> res = llvm::map_to_vector(ofrs, [&](OpFoldResult ofr) {
+ SmallVector<int64_t> res;
+ res.reserve(ofrs.size());
+ for (OpFoldResult ofr : ofrs) {
auto cv = getConstantIntValue(ofr);
if (!cv.has_value())
failed = true;
- return cv.value_or(0);
- });
+ res.push_back(cv.value_or(0));
+ }
----------------
Men-cotton wrote:
I found this crash is actually from the bug of GCC. The bug fixed at the version 14.2.0.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119480
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115033
https://github.com/llvm/llvm-project/pull/170282
More information about the Mlir-commits
mailing list