[llvm] [AArch64][GISel] Separate legalize actions for G_FREEZE from G_IMPLICIT_DEF (PR #88469)

Dhruv Chawla via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 21:25:12 PDT 2024


dc03-work wrote:

> Fundamentally G_FREEZE and G_IMPLICIT_DEF have the same property of being synthetic compiler operations that need to be legal for all register types. They really should have the same legalization rules. It may make sense to replace the current set of rules, but I think they should be moved together

The reason I separated G_FREEZE out was because I found your commit about implementing fewerElementsIf() for G_IMPLICIT_DEF (https://github.com/llvm/llvm-project/commit/3dddb163dd73f69420f356f96e86bb67232b6c95#diff-973c8a5764852eef4468cf4ba0dd6b70a2e0bf769640c9ff728c1f3613908abc) and I was not sure if this was being done for any special reason.

In an ideal world, both G_FREEZE and G_IMPLICIT_DEF would just be able to copy the types (after legalization) of the input operand and of any uses respectively, however I don't think that is possible with the current design of the legalizer.

https://github.com/llvm/llvm-project/pull/88469


More information about the llvm-commits mailing list