Legalization of G_IS_FPCLASS is added. It is implemented similar to
the DAG version with necessary changes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Do you think you could split this into two patches?
- The part where you add G_IS_FPCLASS and add verifier checks
- The part where you add legalization support
llvm/test/CodeGen/X86/GlobalISel/is_fpclass.ll | ||
---|---|---|
2 | Could you do this as a MIR test for the benefit of people who don't speak X86? See lots of legalize-*.mir examples in this directory. |
Addressed reviewers' notes
- Added test to check legalization in target-independent way,
- Do not use Optional with MachineInstrBuilder,
- Add some support for using fewerElements vector handling.
Some support for fewerElements was added, but the support of vector types in X86 Global ISel is weak, and I could not make tests for this case. Some patches for this support are in work, but it is a long trail.
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
7914 | This intrinsic does not interact with floating-point environment, it is a pure function. So it does not need strict variant. | |
7953 | Indeed, thank you. | |
llvm/test/CodeGen/X86/GlobalISel/is_fpclass.ll | ||
2 | New test is added (legalize-is_fpclass.mir), which tests the lowering similar to other legalize-*.mir tests. The idea of using this test was to simplify comparison of the code generation with DAG-variant. This test is obtained from the test added in dependency review item, with tests for vector types stripped out. |
Isn't this implied by this not being a strict opcode?