<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Vectorize/VectorCombine.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>[VectorCombine] Try to scalarize vector loads feeding bitcast instructions. (#164682)</title>
<updated>2025-11-12T15:35:03+00:00</updated>
<author>
<name>Julian Nagele</name>
<email>j.nagele@apple.com</email>
</author>
<published>2025-11-12T15:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8280070a7306b6d939b616e34407b53ceac73b92'/>
<id>8280070a7306b6d939b616e34407b53ceac73b92</id>
<content type='text'>
This change aims to convert vector loads to scalar loads, if they are
only converted to scalars after anyway.

alive2 proof: https://alive2.llvm.org/ce/z/U_rvht</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change aims to convert vector loads to scalar loads, if they are
only converted to scalars after anyway.

alive2 proof: https://alive2.llvm.org/ce/z/U_rvht</pre>
</div>
</content>
</entry>
<entry>
<title>[VectorCombine] support mismatching extract/insert indices for foldInsExtFNeg (#126408)</title>
<updated>2025-11-07T18:35:40+00:00</updated>
<author>
<name>hanbeom</name>
<email>kese111@gmail.com</email>
</author>
<published>2025-11-07T18:35:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=50ba89a22e452b47f79112e7277f40cbdab27bdf'/>
<id>50ba89a22e452b47f79112e7277f40cbdab27bdf</id>
<content type='text'>
insertelt DestVec, (fneg (extractelt SrcVec, Index)), Index 
-&gt; shuffle DestVec, (shuffle (fneg SrcVec), poison, SrcMask), Mask

In previous, the above transform was only possible if the Extract/Insert
Index was the same; this patch makes the above transform possible
even if the two indexes are different.

Proof: https://alive2.llvm.org/ce/z/aDfdyG
Fixes: https://github.com/llvm/llvm-project/issues/125675</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
insertelt DestVec, (fneg (extractelt SrcVec, Index)), Index 
-&gt; shuffle DestVec, (shuffle (fneg SrcVec), poison, SrcMask), Mask

In previous, the above transform was only possible if the Extract/Insert
Index was the same; this patch makes the above transform possible
even if the two indexes are different.

Proof: https://alive2.llvm.org/ce/z/aDfdyG
Fixes: https://github.com/llvm/llvm-project/issues/125675</pre>
</div>
</content>
</entry>
<entry>
<title>[VectorCombine] Avoid inserting freeze when scalarizing extend-extract if all extracts would lead to UB on poison. (#164683)</title>
<updated>2025-11-04T12:39:04+00:00</updated>
<author>
<name>Julian Nagele</name>
<email>j.nagele@apple.com</email>
</author>
<published>2025-11-04T12:39:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=28a20b4af94465155f64228746adc07a82368687'/>
<id>28a20b4af94465155f64228746adc07a82368687</id>
<content type='text'>
This change aims to avoid inserting a freeze instruction between the
load and bitcast when scalarizing extend-extract. This is particularly
useful in combination with
https://github.com/llvm/llvm-project/pull/164682, which can then
potentially further scalarize, provided there is no freeze.

alive2 proof: https://alive2.llvm.org/ce/z/W-GD88</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change aims to avoid inserting a freeze instruction between the
load and bitcast when scalarizing extend-extract. This is particularly
useful in combination with
https://github.com/llvm/llvm-project/pull/164682, which can then
potentially further scalarize, provided there is no freeze.

alive2 proof: https://alive2.llvm.org/ce/z/W-GD88</pre>
</div>
</content>
</entry>
<entry>
<title>[VectorCombine] Preserve cast flags in foldBitOpOfCastConstant (#161237)</title>
<updated>2025-09-30T08:38:03+00:00</updated>
<author>
<name>Hongyu Chen</name>
<email>xxs_chy@outlook.com</email>
</author>
<published>2025-09-30T08:38:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=87bc0f7431891b3f5d83205f856be7362911790e'/>
<id>87bc0f7431891b3f5d83205f856be7362911790e</id>
<content type='text'>
Follow-up of #157822.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-up of #157822.</pre>
</div>
</content>
</entry>
<entry>
<title>[VectorCombine] foldShuffleOfCastops - handle unary shuffles (#160009)</title>
<updated>2025-09-29T13:21:59+00:00</updated>
<author>
<name>Chaitanya Koparkar</name>
<email>ckoparkar@gmail.com</email>
</author>
<published>2025-09-29T13:21:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=766c90f43966fe9eb438e5a6f6378f4e3e0bc37e'/>
<id>766c90f43966fe9eb438e5a6f6378f4e3e0bc37e</id>
<content type='text'>
Fixes #156853.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #156853.</pre>
</div>
</content>
</entry>
<entry>
<title>[VectorCombine] Fix rotation in phi narrowing. (#160465)</title>
<updated>2025-09-29T12:26:35+00:00</updated>
<author>
<name>Leon Clark</name>
<email>Leon4116@gmail.com</email>
</author>
<published>2025-09-29T12:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8df643f66374fc3fc16523a2d6a63d14d4a560a5'/>
<id>8df643f66374fc3fc16523a2d6a63d14d4a560a5</id>
<content type='text'>
Fix bug in #140188 where incoming vectors are rotated in the wrong
direction.﻿

Co-authored-by: Leon Clark &lt;leoclark@amd.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix bug in #140188 where incoming vectors are rotated in the wrong
direction.﻿

Co-authored-by: Leon Clark &lt;leoclark@amd.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[VectorCombine] Fix scalarizeExtExtract for big-endian (#157962)</title>
<updated>2025-09-15T10:08:16+00:00</updated>
<author>
<name>Uyiosa Iyekekpolor</name>
<email>96444432+uyoyo0@users.noreply.github.com</email>
</author>
<published>2025-09-15T10:08:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=994a6a39e13dcc335247a127a5da05905d1ac541'/>
<id>994a6a39e13dcc335247a127a5da05905d1ac541</id>
<content type='text'>
The scalarizeExtExtract transform assumed little-endian lane ordering,
causing miscompiles on big-endian targets such as AIX/PowerPC under -O3
-flto.

This patch updates the shift calculation to handle endianness correctly
for big-endian targets. No functional change
for little-endian targets.

Fixes #158197.

---------

Co-authored-by: Simon Pilgrim &lt;llvm-dev@redking.me.uk&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The scalarizeExtExtract transform assumed little-endian lane ordering,
causing miscompiles on big-endian targets such as AIX/PowerPC under -O3
-flto.

This patch updates the shift calculation to handle endianness correctly
for big-endian targets. No functional change
for little-endian targets.

Fixes #158197.

---------

Co-authored-by: Simon Pilgrim &lt;llvm-dev@redking.me.uk&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[VectorCombine] Add Ext and Trunc support in foldBitOpOfCastConstant (#157822)</title>
<updated>2025-09-11T09:08:47+00:00</updated>
<author>
<name>Hongyu Chen</name>
<email>xxs_chy@outlook.com</email>
</author>
<published>2025-09-11T09:08:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c62ea6598eaab0a1c18a3ff1f067907a58b9a144'/>
<id>c62ea6598eaab0a1c18a3ff1f067907a58b9a144</id>
<content type='text'>
Follow-up of https://github.com/llvm/llvm-project/pull/155216.
This patch doesn't preserve the flags. I will implement it in the
follow-up patch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-up of https://github.com/llvm/llvm-project/pull/155216.
This patch doesn't preserve the flags. I will implement it in the
follow-up patch.</pre>
</div>
</content>
</entry>
<entry>
<title>[InstCombine][VectorCombine][NFC] Unify uses of lossless inverse cast (#156597)</title>
<updated>2025-09-08T13:30:06+00:00</updated>
<author>
<name>Hongyu Chen</name>
<email>xxs_chy@outlook.com</email>
</author>
<published>2025-09-08T13:30:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=75b0c89e626f21e9ba9c920c878cc9e81471f4cf'/>
<id>75b0c89e626f21e9ba9c920c878cc9e81471f4cf</id>
<content type='text'>
This patch addresses
https://github.com/llvm/llvm-project/pull/155216#discussion_r2297724663.
This patch adds a helper function to put the inverse cast on constants,
with cast flags preserved(optional).
Follow-up patches will add trunc/ext handling on VectorCombine and flags
preservation on InstCombine.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch addresses
https://github.com/llvm/llvm-project/pull/155216#discussion_r2297724663.
This patch adds a helper function to put the inverse cast on constants,
with cast flags preserved(optional).
Follow-up patches will add trunc/ext handling on VectorCombine and flags
preservation on InstCombine.</pre>
</div>
</content>
</entry>
<entry>
<title>[VectorCombine] foldSelectShuffle - early-out cases where the max vector register width isn't large enough (#157430)</title>
<updated>2025-09-08T12:04:23+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2025-09-08T12:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ad3a0ae9e15f102e2cdc37e34d47b5b9d6e09497'/>
<id>ad3a0ae9e15f102e2cdc37e34d47b5b9d6e09497</id>
<content type='text'>
Technically this could happen with vector units that can't handle all legal scalar widths - but its good enough to use a generic crash test without a suitable target

Fixes #157335</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Technically this could happen with vector units that can't handle all legal scalar widths - but its good enough to use a generic crash test without a suitable target

Fixes #157335</pre>
</div>
</content>
</entry>
</feed>
