This is an archive of the discontinued LLVM Phabricator instance.

[X86][tablgen] Remove predicates for definitions of KMOV b/c due to no pattern, NFCI
AbandonedPublic

Authored by skan on Apr 15 2023, 7:50 PM.

Diff Detail

Event Timeline

skan created this revision.Apr 15 2023, 7:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2023, 7:50 PM
skan requested review of this revision.Apr 15 2023, 7:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2023, 7:50 PM

Could this information be useful to other tools in the future.

skan added a comment.Apr 15 2023, 8:24 PM

Could this information be useful to other tools in the future.

I'm not very sure, I think there is basically no probability of using it because tools should need CPUID instead of predicate. Predicate does not exactly correspond to CPUID, for example we have predicate NoAVX512, NoAVX and NoVLX_Or_NoVAES. I am trying to remove these predicates b/c they affect the test coverage.

Could this information be useful to other tools in the future.

I'm not very sure, I think there is basically no probability of using it because tools should need CPUID instead of predicate. Predicate does not exactly correspond to CPUID, for example we have predicate NoAVX512, NoAVX and NoVLX_Or_NoVAES. I am trying to remove these predicates b/c they affect the test coverage.

How do they affect the test coverage?

skan added a comment.Apr 15 2023, 9:17 PM

Could this information be useful to other tools in the future.

I'm not very sure, I think there is basically no probability of using it because tools should need CPUID instead of predicate. Predicate does not exactly correspond to CPUID, for example we have predicate NoAVX512, NoAVX and NoVLX_Or_NoVAES. I am trying to remove these predicates b/c they affect the test coverage.

How do they affect the test coverage?

No test fails after removing the predicates. So these code is untested.

craig.topper added inline comments.Apr 15 2023, 9:32 PM
llvm/lib/Target/X86/X86InstrAVX512.td
2885

Aren't there patterns for load/store in avx512_mask_mov?

craig.topper added inline comments.Apr 15 2023, 9:34 PM
llvm/lib/Target/X86/X86InstrAVX512.td
2885

It probably doesn't fail any tests because the types involved are only legal when the predicate is true or because lowering knew to change the load/store because it wasn't supported.

skan abandoned this revision.Apr 15 2023, 10:28 PM
skan marked 2 inline comments as done.
skan added inline comments.
llvm/lib/Target/X86/X86InstrAVX512.td
2885

Ah, you're right. I didn't notice there is pattern in the definition of avx512_mask_mov. Now I believe this change does not make sense.