Skip to content

Commit c5abcb0

Browse files
authored
[X86][GlobalISel] Reorganize tests for G_PHI and support fp80 (#100047)
* Verified scalar support of G_PHI * Added cases with i1, ptr and x86_fp80 types * Added phi inputs variability We don't enable tests for i686 due to lack of float/integer types in legalizer. We don't distinguish between illegal 64 bit integer G_LOAD and legal double load using X87. It leads to artificial G_MERGE_VALUES of floats into a single double.
1 parent 5bae81b commit c5abcb0

File tree

3 files changed

+496
-173
lines changed

3 files changed

+496
-173
lines changed

llvm/lib/Target/X86/GISel/X86LegalizerInfo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ X86LegalizerInfo::X86LegalizerInfo(const X86Subtarget &STI,
315315
getActionDefinitionsBuilder(G_PHI)
316316
.legalIf([=](const LegalityQuery &Query) -> bool {
317317
return typeInSet(0, {s8, s16, s32, p0})(Query) ||
318-
(Is64Bit && typeInSet(0, {s64})(Query)) ||
318+
(UseX87 && typeIs(0, s80)(Query)) ||
319+
(Is64Bit && typeIs(0, s64)(Query)) ||
319320
(HasSSE1 && typeInSet(0, {v16s8, v8s16, v4s32, v2s64})(Query)) ||
320321
(HasAVX && typeInSet(0, {v32s8, v16s16, v8s32, v4s64})(Query)) ||
321322
(HasAVX512 &&

llvm/test/CodeGen/X86/GlobalISel/phi.ll

Lines changed: 0 additions & 172 deletions
This file was deleted.

0 commit comments

Comments
 (0)