[llvm] [GlobalISel] Document minimum legality requirements for G_IMPLICIT_DEF. (PR #117609)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 12:18:58 PST 2024


================
@@ -338,8 +338,8 @@ G_BUILD_VECTOR_TRUNC, G_CONCAT_VECTORS, G_UNMERGE_VALUES, G_PTRTOINT, and
 G_INTTOPTR have already been noted above. In addition to those, the following
 operations have requirements:
 
-* At least one G_IMPLICIT_DEF must be legal. This is usually trivial as it
-  requires no code to be selected.
+* For every type that can be produced by any instruction, G_IMPLICIT_DEF must be
+  legal. This is usually trivial as it requires no code to be selected.
----------------
tschuett wrote:

The AArch64 legalizer disagrees/is nonconforming.

I see the legalizer as the ground-truth for legality questions. I prefer to query the legalizer and not enforce rules on the legalizer.

I don't see any benefit of this change. It makes the state worth. It gives you an escape-hatch that you don't have to query the legalizer in some situations.

All non-Apple:-)

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


More information about the llvm-commits mailing list