<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/Mips/MipsFastISel.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>[llvm] Use conventional enum declarations (NFC) (#166318)</title>
<updated>2025-11-04T15:12:53+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-11-04T15:12:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=50faea28fb93c5938391fdc0a2cfd70b28280537'/>
<id>50faea28fb93c5938391fdc0a2cfd70b28280537</id>
<content type='text'>
This patch replaces:

  using Foo = enum { A, B, C };

with the more conventional:

  enum Foo { A, B, C };

These two enum declaration styles are not identical, but their
difference does not matter in these .cpp files.  With the "using Foo"
style, the enum is unnamed and cannot be forward-declared, whereas the
conventional style creates a named enum that can be.  Since these
changes are confined to .cpp files, this distinction has no practical
impact here.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces:

  using Foo = enum { A, B, C };

with the more conventional:

  enum Foo { A, B, C };

These two enum declaration styles are not identical, but their
difference does not matter in these .cpp files.  With the "using Foo"
style, the enum is unnamed and cannot be forward-declared, whereas the
conventional style creates a named enum that can be.  Since these
changes are confined to .cpp files, this distinction has no practical
impact here.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (#163702)</title>
<updated>2025-10-16T13:52:28+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-10-16T13:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=96cf20658db8edc5ddd64a4ce8f7fda2c1b002a9'/>
<id>96cf20658db8edc5ddd64a4ce8f7fda2c1b002a9</id>
<content type='text'>
This patch replaces LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]],
introduced as part of C++17.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]],
introduced as part of C++17.</pre>
</div>
</content>
</entry>
<entry>
<title>[Mips] Remove custom "original type" handling (#154082)</title>
<updated>2025-08-19T07:26:38+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-08-19T07:26:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b2fae5b3c716eab31a43ef7776a46fb56547fa5b'/>
<id>b2fae5b3c716eab31a43ef7776a46fb56547fa5b</id>
<content type='text'>
Replace Mips custom logic for retaining information about original types
in calling convention lowering by directly querying the OrigTy that is
now available.

There is one change in behavior here: If the return type is a struct
containing fp128 plus additional members, the result is now different,
as we no longer special case to a single fp128 member. I believe this is
fine, because this is a fake ABI anyway: Such cases should actually use
sret, and as such are a frontend responsibility, and Clang will indeed
emit these as sret, not as a return value struct. So this only impacts
manually written IR tests.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace Mips custom logic for retaining information about original types
in calling convention lowering by directly querying the OrigTy that is
now available.

There is one change in behavior here: If the return type is a struct
containing fp128 plus additional members, the result is now different,
as we no longer special case to a single fp128 member. I believe this is
fine, because this is a fake ABI anyway: Such cases should actually use
sret, and as such are a frontend responsibility, and Clang will indeed
emit these as sret, not as a return value struct. So this only impacts
manually written IR tests.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen][Mips] Remove fp128 libcall list (#153798)</title>
<updated>2025-08-18T07:22:41+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-08-18T07:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=238c3dcd0dcc475e0695541351b8f4ad67c465b4'/>
<id>238c3dcd0dcc475e0695541351b8f4ad67c465b4</id>
<content type='text'>
Mips requires fp128 args/returns to be passed differently than i128. It
handles this by inspecting the pre-legalization type. However, for soft
float libcalls, the original type is currently not provided (it will
look like a i128 call). To work around that, MIPS maintains a list of
libcalls working on fp128.

This patch removes that list by providing the original, pre-softening
type to calling convention lowering. This is done by carrying additional
information in CallLoweringInfo, as we unfortunately do need both types
(we want the un-softened type for OrigTy, but we need the softened type
for the actual register assignment etc.)

This is in preparation for completely removing all the custom
pre-analysis code in the Mips backend and replacing it with use of
OrigTy.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mips requires fp128 args/returns to be passed differently than i128. It
handles this by inspecting the pre-legalization type. However, for soft
float libcalls, the original type is currently not provided (it will
look like a i128 call). To work around that, MIPS maintains a list of
libcalls working on fp128.

This patch removes that list by providing the original, pre-softening
type to calling convention lowering. This is done by carrying additional
information in CallLoweringInfo, as we unfortunately do need both types
(we want the un-softened type for OrigTy, but we need the softened type
for the actual register assignment etc.)

This is in preparation for completely removing all the custom
pre-analysis code in the Mips backend and replacing it with use of
OrigTy.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Provide original IR type to CC lowering (NFC) (#152709)</title>
<updated>2025-08-11T06:57:53+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-08-11T06:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e92b7e9641949f9d9c2ca8964c31a437272d15af'/>
<id>e92b7e9641949f9d9c2ca8964c31a437272d15af</id>
<content type='text'>
It is common to have ABI requirements for illegal types: For example,
two i64 argument parts that originally came from an fp128 argument may
have a different call ABI than ones that came from a i128 argument.

The current calling convention lowering does not provide access to this
information, so backends come up with various hacks to support it (like
additional pre-analysis cached in CCState, or bypassing the default
logic entirely).

This PR adds the original IR type to InputArg/OutputArg and passes it
down to CCAssignFn. It is not actually used anywhere yet, this just does
the mechanical changes to thread through the new argument.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is common to have ABI requirements for illegal types: For example,
two i64 argument parts that originally came from an fp128 argument may
have a different call ABI than ones that came from a i128 argument.

The current calling convention lowering does not provide access to this
information, so backends come up with various hacks to support it (like
additional pre-analysis cached in CCState, or bypassing the default
logic entirely).

This PR adds the original IR type to InputArg/OutputArg and passes it
down to CCAssignFn. It is not actually used anywhere yet, this just does
the mechanical changes to thread through the new argument.</pre>
</div>
</content>
</entry>
<entry>
<title>[Mips] Do not emit instruction teq if divisor is non-zero immediate value in FastISel implementation (#135768)</title>
<updated>2025-04-25T09:36:27+00:00</updated>
<author>
<name>yingopq</name>
<email>115543042+yingopq@users.noreply.github.com</email>
</author>
<published>2025-04-25T09:36:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=194da37b71a07f9959623231a5fa9fd1b11187cd'/>
<id>194da37b71a07f9959623231a5fa9fd1b11187cd</id>
<content type='text'>
Add a check before emitting the teq instruction to check whether the
divisor is a non-zero immediate value.

Fix #130629.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a check before emitting the teq instruction to check whether the
divisor is a non-zero immediate value.

Fix #130629.</pre>
</div>
</content>
</entry>
<entry>
<title>[FastISel] Use Register. NFC</title>
<updated>2025-03-05T17:13:02+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2025-03-05T17:13:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=58670aa79a7e4129b89186a5076b08bef4564aa6'/>
<id>58670aa79a7e4129b89186a5076b08bef4564aa6</id>
<content type='text'>
This focuses on the common interfaces and tablegen. More changes
are needed to individual targets.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This focuses on the common interfaces and tablegen. More changes
are needed to individual targets.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Mips] Remove unused includes (NFC) (#116499)</title>
<updated>2024-11-16T20:13:26+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-11-16T20:13:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=73e89cf66d4b88d568ff4c718ae7bf55588ef2be'/>
<id>73e89cf66d4b88d568ff4c718ae7bf55588ef2be</id>
<content type='text'>
Identified with misc-include-cleaner.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with misc-include-cleaner.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][Mips] Bail on underaligned loads/stores in FastISel. (#106231)</title>
<updated>2024-09-12T14:10:19+00:00</updated>
<author>
<name>Alex Rønne Petersen</name>
<email>alex@alexrp.com</email>
</author>
<published>2024-09-12T14:10:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c0b3e491cc9afe10c310334ceac1971482bb0410'/>
<id>c0b3e491cc9afe10c310334ceac1971482bb0410</id>
<content type='text'>
We encountered this problem in Zig, causing all of our
`mips(el)-linux-gnueabi*` tests to fail:
https://github.com/ziglang/zig/issues/21215

For these unusual cases, let's just bail in `MipsFastISel` since
`MipsTargetLowering` can handle them fine.

Note: I don't have commit access.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We encountered this problem in Zig, causing all of our
`mips(el)-linux-gnueabi*` tests to fail:
https://github.com/ziglang/zig/issues/21215

For these unusual cases, let's just bail in `MipsFastISel` since
`MipsTargetLowering` can handle them fine.

Note: I don't have commit access.</pre>
</div>
</content>
</entry>
<entry>
<title>[Mips] Fix fast isel for i16 bswap. (#103398)</title>
<updated>2024-08-16T21:54:51+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-08-16T21:54:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ebe7265b142f370f0a563fece5db22f57383ba2d'/>
<id>ebe7265b142f370f0a563fece5db22f57383ba2d</id>
<content type='text'>
We need to mask the SRL result to 8 bits before ORing in the SLL. This
is needed in case bits 23:16 of the input aren't zero. They will have
been shifted into bits 15:8.

We don't need to AND the result with 0xffff. It's ok if the upper 16
bits of the register are garbage.

Fixes #103035.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to mask the SRL result to 8 bits before ORing in the SLL. This
is needed in case bits 23:16 of the input aren't zero. They will have
been shifted into bits 15:8.

We don't need to AND the result with 0xffff. It's ok if the upper 16
bits of the register are garbage.

Fixes #103035.</pre>
</div>
</content>
</entry>
</feed>
