diff options
author | Lei Huang <lei@ca.ibm.com> | 2018-07-05 06:21:37 +0000 |
---|---|---|
committer | Lei Huang <lei@ca.ibm.com> | 2018-07-05 06:21:37 +0000 |
commit | a855e17f096d29e766362aa6e96ffe6d0c886ca2 (patch) | |
tree | 79b12b8c74c0e75613e34d56fe02c14467520a3b /llvm/lib/Target/PowerPC/PPCInstrVSX.td | |
parent | 2161ec7ee2c4bc5e02e9c4de8a3857b37dba0839 (diff) | |
download | bcm5719-llvm-a855e17f096d29e766362aa6e96ffe6d0c886ca2.tar.gz bcm5719-llvm-a855e17f096d29e766362aa6e96ffe6d0c886ca2.zip |
[Power9] Ensure float128 in non-homogenous aggregates are passed via VSX reg
Non-homogenous aggregates are passed in consecutive GPRs, in GPRs and in memory,
or in memory. This patch ensures that float128 members of non-homogenous
aggregates are passed via VSX registers.
This is done via custom lowering a bitcast of a build_pari(i64,i64) to float128
to a new PPCISD node, BUILD_FP128.
Differential Revision: https://reviews.llvm.org/D48308
llvm-svn: 336310
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCInstrVSX.td')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrVSX.td | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrVSX.td b/llvm/lib/Target/PowerPC/PPCInstrVSX.td index 1aea324995e..06e06404a18 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrVSX.td +++ b/llvm/lib/Target/PowerPC/PPCInstrVSX.td @@ -3387,6 +3387,17 @@ let AddedComplexity = 400, Predicates = [HasP9Vector] in { } // end HasP9Vector, AddedComplexity +let AddedComplexity = 400 in { + let Predicates = [IsISA3_0, HasP9Vector, HasDirectMove, IsBigEndian] in { + def : Pat<(f128 (PPCbuild_fp128 i64:$rB, i64:$rA)), + (f128 (COPY_TO_REGCLASS (MTVSRDD $rB, $rA), VRRC))>; + } + let Predicates = [IsISA3_0, HasP9Vector, HasDirectMove, IsLittleEndian] in { + def : Pat<(f128 (PPCbuild_fp128 i64:$rA, i64:$rB)), + (f128 (COPY_TO_REGCLASS (MTVSRDD $rB, $rA), VRRC))>; + } +} + let Predicates = [HasP9Vector] in { let isPseudo = 1 in { let mayStore = 1 in { |