<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[MLIR] Extend vector.scatter to accept tensor as base (#165548)</title>
<updated>2025-11-14T19:56:24+00:00</updated>
<author>
<name>Ryutaro Okada</name>
<email>140468571+sakupan102@users.noreply.github.com</email>
</author>
<published>2025-11-14T19:56:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7e7ea9c5357efcdf9ba6bd7ea3669e607a9af400'/>
<id>7e7ea9c5357efcdf9ba6bd7ea3669e607a9af400</id>
<content type='text'>
This PR makes the following improvements to `vector.scatter` and its
lowering pipeline:
- In addition to `memref`, accept a ranked `tensor` as the base operand
of `vector.scatter`, similar to `vector.transfer_write`.
- Implement bufferization support for `vector.scatter`, so that
tensor-based scatter ops can be fully lowered to memref-based forms.

It's worth to complete the functionality of map_scatter decomposition.
Full discussion can be found here:
https://github.com/iree-org/iree/issues/21135

---------

Signed-off-by: Ryutaro Okada &lt;1015ryu88@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR makes the following improvements to `vector.scatter` and its
lowering pipeline:
- In addition to `memref`, accept a ranked `tensor` as the base operand
of `vector.scatter`, similar to `vector.transfer_write`.
- Implement bufferization support for `vector.scatter`, so that
tensor-based scatter ops can be fully lowered to memref-based forms.

It's worth to complete the functionality of map_scatter decomposition.
Full discussion can be found here:
https://github.com/iree-org/iree/issues/21135

---------

Signed-off-by: Ryutaro Okada &lt;1015ryu88@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Add FP software implementation lowering pass: `arith-to-apfloat` (#167848)</title>
<updated>2025-11-13T09:35:30+00:00</updated>
<author>
<name>Matthias Springer</name>
<email>me@m-sp.org</email>
</author>
<published>2025-11-13T09:35:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7a53d33e7c29ce3058eb12d2f85ca0a46b0ea363'/>
<id>7a53d33e7c29ce3058eb12d2f85ca0a46b0ea363</id>
<content type='text'>
Reland pass and fix linker errors.

---------

Co-authored-by: Maksim Levental &lt;maksim.levental@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reland pass and fix linker errors.

---------

Co-authored-by: Maksim Levental &lt;maksim.levental@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Reland yet again: [mlir] Add FP software implementation lowering pass: `arith-to-apfloat`" (#167834)</title>
<updated>2025-11-13T07:02:21+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-11-13T07:02:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=140e07c862ccf02c3c7412187ce79139ac45f017'/>
<id>140e07c862ccf02c3c7412187ce79139ac45f017</id>
<content type='text'>
Reverts llvm/llvm-project#167608

Broken builder https://lab.llvm.org/buildbot/#/builders/52/builds/12781</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#167608

Broken builder https://lab.llvm.org/buildbot/#/builders/52/builds/12781</pre>
</div>
</content>
</entry>
<entry>
<title>Reland yet again: [mlir] Add FP software implementation lowering pass: `arith-to-apfloat` (#167608)</title>
<updated>2025-11-13T01:57:53+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-11-13T01:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0bba1e76581bad04e7d7f09f5115ae5e2989e0d9'/>
<id>0bba1e76581bad04e7d7f09f5115ae5e2989e0d9</id>
<content type='text'>
Fix both symbol visibility issue in the mlir_apfloat_wrappers lib and the linkage issue in ArithToAPFloat.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix both symbol visibility issue in the mlir_apfloat_wrappers lib and the linkage issue in ArithToAPFloat.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Reapply "Reapply "[mlir] Add FP software implementation lowering pass: `arith-to-apfloat` (#166618)" (#167431)"" (#167549)</title>
<updated>2025-11-11T17:29:09+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-11-11T17:29:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e67ac07881c215c91fe1ec714be6f3582178073c'/>
<id>e67ac07881c215c91fe1ec714be6f3582178073c</id>
<content type='text'>
Reverts llvm/llvm-project#167436 to fix sanitizers</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#167436 to fix sanitizers</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "Reapply "[mlir] Add FP software implementation lowering pass: `arith-to-apfloat` (#166618)" (#167431)" (#167436)</title>
<updated>2025-11-11T16:50:37+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-11-11T16:50:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=75751f33a8702d14184d435d544f38149514b63f'/>
<id>75751f33a8702d14184d435d544f38149514b63f</id>
<content type='text'>
Reland https://github.com/llvm/llvm-project/pull/166618 by fixing
missing symbol issues by explicitly loading
`--shared-libs=%mlir_apfloat_wrappers` as well as
`--shared-libs=%mlir_c_runner_utils`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reland https://github.com/llvm/llvm-project/pull/166618 by fixing
missing symbol issues by explicitly loading
`--shared-libs=%mlir_apfloat_wrappers` as well as
`--shared-libs=%mlir_c_runner_utils`.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Reapply "[mlir] Add FP software implementation lowering pass: `arith-to-apfloat` (#166618)" (#167431)" (#167435)</title>
<updated>2025-11-11T01:40:51+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-11-11T01:40:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=93b3c1b7e114ca50e6687d8c0a0d30508063616d'/>
<id>93b3c1b7e114ca50e6687d8c0a0d30508063616d</id>
<content type='text'>
This reverts commit 0e639ae6e030ade849fa7a09cb7dc40b42f25373.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 0e639ae6e030ade849fa7a09cb7dc40b42f25373.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[mlir] Add FP software implementation lowering pass: `arith-to-apfloat` (#166618)" (#167431)</title>
<updated>2025-11-11T01:13:29+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-11-11T01:13:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0e639ae6e030ade849fa7a09cb7dc40b42f25373'/>
<id>0e639ae6e030ade849fa7a09cb7dc40b42f25373</id>
<content type='text'>
Reland https://github.com/llvm/llvm-project/pull/166618 with
MLIRFuncUtils linked in.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reland https://github.com/llvm/llvm-project/pull/166618 with
MLIRFuncUtils linked in.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[mlir] Add FP software implementation lowering pass: `arith-to-apfloat` (#166618)" (#167429)</title>
<updated>2025-11-11T00:54:44+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-11-11T00:54:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=70d379fd7a1e3ab54e4afc46e68411daa1013550'/>
<id>70d379fd7a1e3ab54e4afc46e68411daa1013550</id>
<content type='text'>
This reverts commit 222f4e494a0cd9515c242fd083c2776772734385.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 222f4e494a0cd9515c242fd083c2776772734385.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Add FP software implementation lowering pass: `arith-to-apfloat` (#166618)</title>
<updated>2025-11-11T00:21:39+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-11-11T00:21:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=222f4e494a0cd9515c242fd083c2776772734385'/>
<id>222f4e494a0cd9515c242fd083c2776772734385</id>
<content type='text'>
This commit adds a new pass that lowers floating-point `arith`
operations to calls into the execution engine runtime library. Currently
supported operations: `addf`, `subf`, `mulf`, `divf`, `remf`.

All floating-point types that have an APFloat semantics are supported.
This includes low-precision floating-point types such as `f4E2M1FN` that
cannot execute natively on CPUs.

This commit also improves the `vector.print` lowering pattern to call
into the runtime library for floating-point types that are not supported
by LLVM. This is necessary to write a meaningful integration test.

The way it works is 

```mlir
func.func @full_example() {
  %a = arith.constant 1.4 : f8E4M3FN
  %b = func.call @foo() : () -&gt; (f8E4M3FN)
  %c = arith.addf %a, %b : f8E4M3FN
  vector.print %c : f8E4M3FN
  return
}
```

gets transformed to

```mlir
func.func private @__mlir_apfloat_add(i32, i64, i64) -&gt; i6
func.func @full_example() {
  %cst = arith.constant 1.375000e+00 : f8E4M3FN
  %0 = call @foo() : () -&gt; f8E4M3FN
  // bitcast operand A to integer of equal width
  %1 = arith.bitcast %cst : f8E4M3FN to i8
  // zext A to i64
  %2 = arith.extui %1 : i8 to i64
  // same for operand B
  %3 = arith.bitcast %0 : f8E4M3FN to i8
  %4 = arith.extui %3 : i8 to i64
  // get the llvm::fltSemantics(f8E4M3FN) as an enum
  %c10_i32 = arith.constant 10 : i32
  // call the impl against APFloat in mlir_apfloat_wrappers
  %5 = call @__mlir_apfloat_add(%c10_i32, %2, %4) : (i32, i64, i64) -&gt; i64
  // "cast" back to the original fp type
  %6 = arith.trunci %5 : i64 to i8
  %7 = arith.bitcast %6 : i8 to f8E4M3FN
  vector.print %7 : f8E4M3FN
}
```

Note, `llvm::fltSemantics(f8E4M3FN)` is emitted by the pattern each time
an `arith` op is transformed, thereby making the call to
`__mlir_apfloat_add` correct (i.e., no name mangling on type necessary).


RFC:
https://discourse.llvm.org/t/rfc-software-implementation-for-unsupported-fp-types-in-convert-arith-to-llvm/88785

---------

Co-authored-by: Matthias Springer &lt;me@m-sp.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds a new pass that lowers floating-point `arith`
operations to calls into the execution engine runtime library. Currently
supported operations: `addf`, `subf`, `mulf`, `divf`, `remf`.

All floating-point types that have an APFloat semantics are supported.
This includes low-precision floating-point types such as `f4E2M1FN` that
cannot execute natively on CPUs.

This commit also improves the `vector.print` lowering pattern to call
into the runtime library for floating-point types that are not supported
by LLVM. This is necessary to write a meaningful integration test.

The way it works is 

```mlir
func.func @full_example() {
  %a = arith.constant 1.4 : f8E4M3FN
  %b = func.call @foo() : () -&gt; (f8E4M3FN)
  %c = arith.addf %a, %b : f8E4M3FN
  vector.print %c : f8E4M3FN
  return
}
```

gets transformed to

```mlir
func.func private @__mlir_apfloat_add(i32, i64, i64) -&gt; i6
func.func @full_example() {
  %cst = arith.constant 1.375000e+00 : f8E4M3FN
  %0 = call @foo() : () -&gt; f8E4M3FN
  // bitcast operand A to integer of equal width
  %1 = arith.bitcast %cst : f8E4M3FN to i8
  // zext A to i64
  %2 = arith.extui %1 : i8 to i64
  // same for operand B
  %3 = arith.bitcast %0 : f8E4M3FN to i8
  %4 = arith.extui %3 : i8 to i64
  // get the llvm::fltSemantics(f8E4M3FN) as an enum
  %c10_i32 = arith.constant 10 : i32
  // call the impl against APFloat in mlir_apfloat_wrappers
  %5 = call @__mlir_apfloat_add(%c10_i32, %2, %4) : (i32, i64, i64) -&gt; i64
  // "cast" back to the original fp type
  %6 = arith.trunci %5 : i64 to i8
  %7 = arith.bitcast %6 : i8 to f8E4M3FN
  vector.print %7 : f8E4M3FN
}
```

Note, `llvm::fltSemantics(f8E4M3FN)` is emitted by the pattern each time
an `arith` op is transformed, thereby making the call to
`__mlir_apfloat_add` correct (i.e., no name mangling on type necessary).


RFC:
https://discourse.llvm.org/t/rfc-software-implementation-for-unsupported-fp-types-in-convert-arith-to-llvm/88785

---------

Co-authored-by: Matthias Springer &lt;me@m-sp.org&gt;</pre>
</div>
</content>
</entry>
</feed>
