Pull some of the safe for 32bit pattern matching for Pwr8 and above.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCInstrVSX.td | ||
---|---|---|
3185–3186 | This pattern should be moved to an IsPPC64 block. | |
llvm/test/CodeGen/PowerPC/aix-p8-scalar_vector_conversions.ll | ||
2 ↗ | (On Diff #328007) | I think we should have the ppc64 test in p8-scalar_vector_conversions.ll since it is essentially the same as the BE results in there but without the descriptive register names. Then rename this file staring with aix32. |
I think we should have the ppc64 test in p8-scalar_vector_conversions.ll since it is essentially the same as the BE results in there but without the descriptive register names. Then rename this file staring with aix32.
Thanks, that's a good suggestion. I added a line in between the LE/BE/AIX test to hopefully make it easier to read in that file.
Previous version of the patch only legalized the EXTRACT_VECTOR_ELT node in 64Bit mode. Remove that condition so that we are using VSX instructions to extract vector elements in 32bit mode when we can
The change is straightforward, but it kind of needs another review.
llvm/lib/Target/PowerPC/PPCInstrVSX.td | ||
---|---|---|
3208 | Moving this here is just half the story. You will also have to add a 32-bit version of this along with the respective test. It should be straightforward to implement The test to add would be something like: define float @test(<4 x float> %a, i32 %idx) local_unnamed_addr #0 { entry: %vecext = extractelement <4 x float> %a, i32 %idx ret float %vecext } |
llvm/lib/Target/PowerPC/PPCInstrVSX.td | ||
---|---|---|
2204 | This was giving me trouble and @nemanjai helped. Since the 32bit PPC implementation needs to account for SPE, the definition of GPRC_NOR0 requires we type ZERO. | |
3208 | I added this and a 32bit version of variable double extraction as well. Thank you for the offline help in addressing the issues in implementing this. |
Nit: spaces after operands.