<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/RISCV/RISCVISelLowering.cpp, branch users/mingmingl-llvm/samplefdo-profile-format</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>[RISCV] Add helper method for detecting BEXTI or TH_TST is supported. NFC (#157915)</title>
<updated>2025-09-10T19:16:46+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-09-10T19:16:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c6947dad53dacc19d47b4da6b1984ca39ec111f6'/>
<id>c6947dad53dacc19d47b4da6b1984ca39ec111f6</id>
<content type='text'>
These instructions both extract single bit to bit 0 and fill the upper
bits with 0.

There's at least one place where we check for BEXTI but not TH_TST. I
wanted to keep this patch NFC so that will be a follow up fix.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These instructions both extract single bit to bit 0 and fill the upper
bits with 0.

There's at least one place where we check for BEXTI but not TH_TST. I
wanted to keep this patch NFC so that will be a follow up fix.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Extend zvqdot matching to handle disjoint or (#157901)</title>
<updated>2025-09-10T17:27:51+00:00</updated>
<author>
<name>Hongyu Chen</name>
<email>xxs_chy@outlook.com</email>
</author>
<published>2025-09-10T17:27:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=33c9236bf870bc732a48a0256e90b907d1c21a49'/>
<id>33c9236bf870bc732a48a0256e90b907d1c21a49</id>
<content type='text'>
This patch makes use of pattern matching to handle disjoint or. Also, it
simplifies the multiplication matching.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes use of pattern matching to handle disjoint or. Also, it
simplifies the multiplication matching.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Add helper method for checking for Zicond or XVentanaCondOps. NFC (#157891)</title>
<updated>2025-09-10T17:24:47+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-09-10T17:24:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b580829c2b16de0b22716b3f9b9a9b2e79c55af5'/>
<id>b580829c2b16de0b22716b3f9b9a9b2e79c55af5</id>
<content type='text'>
These two extensions have identical functionality so we always want to
treat them the same.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These two extensions have identical functionality so we always want to
treat them the same.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Fold (X &amp; -(1 &lt;&lt; C1) &amp; 0xffffffff) == C2 &lt;&lt; C1 to sraiw X, C1 == C2. (#157617)</title>
<updated>2025-09-10T15:51:47+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-09-10T15:51:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=61e4d2312d59d059f775734a3a7c96a6914c07b7'/>
<id>61e4d2312d59d059f775734a3a7c96a6914c07b7</id>
<content type='text'>
We had an existing fold for (X &amp; -(1 &lt;&lt; C1) &amp; 0xffffffff) == 0
which we can generalize to support comparing to constants other
than 0.
    
Previously we used srliw, but this generalizes better using sraiw.
I'm restricting to the case where C2 is simm12 or 2048 to allow
sraiw+addi/xori+seqz/snez to be used. Other constants require a
more careful analysis of the constants involved.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We had an existing fold for (X &amp; -(1 &lt;&lt; C1) &amp; 0xffffffff) == 0
which we can generalize to support comparing to constants other
than 0.
    
Previously we used srliw, but this generalizes better using sraiw.
I'm restricting to the case where C2 is simm12 or 2048 to allow
sraiw+addi/xori+seqz/snez to be used. Other constants require a
more careful analysis of the constants involved.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV][NFC] Fix a misnamed variable (#157686)</title>
<updated>2025-09-10T07:09:23+00:00</updated>
<author>
<name>Piotr Fusik</name>
<email>p.fusik@samsung.com</email>
</author>
<published>2025-09-10T07:09:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=660441af7aaf842729832073d87f7ade1195222d'/>
<id>660441af7aaf842729832073d87f7ade1195222d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Add VendorXTHeadCondMov to useInversedSetcc. (#157758)</title>
<updated>2025-09-10T05:47:51+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-09-10T05:47:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=39c8df3d0160ef26f239b1ebb49da63e36963308'/>
<id>39c8df3d0160ef26f239b1ebb49da63e36963308</id>
<content type='text'>
These instructions have a eqz/nez operand like Zicond and
XVentanaCondOps so the goal of using bexti seems applicable to them as
well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These instructions have a eqz/nez operand like Zicond and
XVentanaCondOps so the goal of using bexti seems applicable to them as
well.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Undo fneg (fmul x, y) -&gt; fmul x, (fneg y) transform (#157388)</title>
<updated>2025-09-09T01:30:33+00:00</updated>
<author>
<name>Luke Lau</name>
<email>luke@igalia.com</email>
</author>
<published>2025-09-09T01:30:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=192d13ea4df1e9535e8736175231798bcde42bb5'/>
<id>192d13ea4df1e9535e8736175231798bcde42bb5</id>
<content type='text'>
InstCombine will hoist an fneg through an fmul, but not for fadd/fsub.
This prevents us from matching fmsub and fnmadd in some cases.

This patch adds a DAG combine to undo this in InstCombine, which helps
some hot loops in 508.namd_r:

@@ -983,18 +983,15 @@
        fld     ft2, 48(a5)
        fld     ft3, 64(a5)
        fld     ft4, 72(a5)
-       fneg.d  fa0, fa0
-       fneg.d  ft0, ft0
-       fneg.d  ft2, ft2
        fmul.d  fa3, ft5, fa3
        fmul.d  fa0, fa3, fa0
        fmul.d  ft0, fa3, ft0
        fmul.d  fa3, fa3, ft2
        fld     ft2, 0(s1)
        fmul.d  fa4, ft5, fa4
-       fmadd.d fa2, fa4, fa2, fa0
-       fmadd.d ft6, fa4, ft6, ft0
-       fmadd.d fa4, fa4, ft1, fa3
+       fmsub.d fa2, fa4, fa2, fa0
+       fmsub.d ft6, fa4, ft6, ft0
+       fmsub.d fa4, fa4, ft1, fa3

This gives a [1.77% improvement in both instruction count and runtime on
508.namd_r](https://lnt.lukelau.me/db_default/v4/nts/profile/1/1022/1021)

This also causes some more fnegs to be sunk after a bitcast to integer,
so they're now done as xor. From glancing at some of the schedules for
WriteFSGN my guess is that this is also profitable.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
InstCombine will hoist an fneg through an fmul, but not for fadd/fsub.
This prevents us from matching fmsub and fnmadd in some cases.

This patch adds a DAG combine to undo this in InstCombine, which helps
some hot loops in 508.namd_r:

@@ -983,18 +983,15 @@
        fld     ft2, 48(a5)
        fld     ft3, 64(a5)
        fld     ft4, 72(a5)
-       fneg.d  fa0, fa0
-       fneg.d  ft0, ft0
-       fneg.d  ft2, ft2
        fmul.d  fa3, ft5, fa3
        fmul.d  fa0, fa3, fa0
        fmul.d  ft0, fa3, ft0
        fmul.d  fa3, fa3, ft2
        fld     ft2, 0(s1)
        fmul.d  fa4, ft5, fa4
-       fmadd.d fa2, fa4, fa2, fa0
-       fmadd.d ft6, fa4, ft6, ft0
-       fmadd.d fa4, fa4, ft1, fa3
+       fmsub.d fa2, fa4, fa2, fa0
+       fmsub.d ft6, fa4, ft6, ft0
+       fmsub.d fa4, fa4, ft1, fa3

This gives a [1.77% improvement in both instruction count and runtime on
508.namd_r](https://lnt.lukelau.me/db_default/v4/nts/profile/1/1022/1021)

This also causes some more fnegs to be sunk after a bitcast to integer,
so they're now done as xor. From glancing at some of the schedules for
WriteFSGN my guess is that this is also profitable.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Allow constants in tryFoldSelectIntoOp (#157376)</title>
<updated>2025-09-08T20:11:34+00:00</updated>
<author>
<name>Philip Reames</name>
<email>preames@rivosinc.com</email>
</author>
<published>2025-09-08T20:11:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=db746c65b1ba4b6d34b5691488c6ee413273c797'/>
<id>db746c65b1ba4b6d34b5691488c6ee413273c797</id>
<content type='text'>
For simm12 constants this allows the use of e.g. addi/xori, and for
non-simm12 constants seems to still produce better code than the default
lowering.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For simm12 constants this allows the use of e.g. addi/xori, and for
non-simm12 constants seems to still produce better code than the default
lowering.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Check for legal type before calling getSimpleValueType() in matchSplatAsGather. (#157188)</title>
<updated>2025-09-06T05:00:38+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-09-06T05:00:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=151c6edd4592b78984f80f22ced1fef52b5e7ab1'/>
<id>151c6edd4592b78984f80f22ced1fef52b5e7ab1</id>
<content type='text'>
This just reorders existing so we do the legal type check first.

In this particular test case we're also protected by the i1 check that I
also moved earlier.

Fixes #157177.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This just reorders existing so we do the legal type check first.

In this particular test case we're also protected by the i1 check that I
also moved earlier.

Fixes #157177.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Use non-VP select in gather-&gt;strided load combine. NFCish (#157070)</title>
<updated>2025-09-06T03:45:48+00:00</updated>
<author>
<name>Luke Lau</name>
<email>luke@igalia.com</email>
</author>
<published>2025-09-06T03:45:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a43489d546fdb0a5912e0b49437ea6266b936c72'/>
<id>a43489d546fdb0a5912e0b49437ea6266b936c72</id>
<content type='text'>
Similar to #157068, remove our reliance on trivial VP intrinsics by
using a regular select instruction and letting RISCVVLOptimizer take
care of VL.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to #157068, remove our reliance on trivial VP intrinsics by
using a regular select instruction and letting RISCVVLOptimizer take
care of VL.</pre>
</div>
</content>
</entry>
</feed>
