[llvm] [X86][GlobalISel] Add instruction selection for G_SELECT (PR #70753)
Evgenii Kudriashov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 31 12:35:39 PDT 2023
================
@@ -1789,6 +1793,47 @@ bool X86InstructionSelector::selectMulDivRem(MachineInstr &I,
return true;
}
+bool X86InstructionSelector::selectSelect(MachineInstr &I,
----------------
e-kud wrote:
Yes. There are only patterns for `X86ISD::CMOV` so we need to copy-paste patterns for `ISD::SELECT`.
There is another way: we can legalize `G_SELECT` into `G_CMOV` but then we'll meet a problem that there is no register bank for `EFLAGS`. So we can't match instructions as we can't match with EFLAGS. It seems that most of the opcodes here are related to `EFLAGS`. This fact I've revealed only now. For sure it should be fixed so that EFLAGS matching works and we can reuse tblgen.
https://github.com/llvm/llvm-project/pull/70753
More information about the llvm-commits
mailing list