llvm.org GIT mirror llvm / 54993bc
[PPC] basic support for Power 9 direct move instructions http://reviews.llvm.org/D18097 Initial support does not include any patterns to generate this instructions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265031 91177308-0d34-0410-b5e6-96231b3b80d8 Ehsan Amiri 4 years ago
3 changed file(s) with 39 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
12151215 } // AddedComplexity = 400
12161216 } // HasP8Vector
12171217
1218 let Predicates = [HasDirectMove, HasVSX] in {
1218 let Predicates = [HasDirectMove] in {
12191219 // VSX direct move instructions
12201220 def MFVSRD : XX1_RS6_RD5_XO<31, 51, (outs g8rc:$rA), (ins vsfrc:$XT),
12211221 "mfvsrd $rA, $XT", IIC_VecGeneral,
12341234 def MTVSRWZ : XX1_RS6_RD5_XO<31, 243, (outs vsfrc:$XT), (ins gprc:$rA),
12351235 "mtvsrwz $XT, $rA", IIC_VecGeneral,
12361236 [(set f64:$XT, (PPCmtvsrz i32:$rA))]>;
1237 } // HasDirectMove, HasVSX
1237 } // HasDirectMove
1238
1239 let Predicates = [IsISA3_0, HasDirectMove] in {
1240 def MTVSRWS: XX1_RS6_RD5_XO<31, 403, (outs vsrc:$XT), (ins gprc:$rA),
1241 "mtvsrws $XT, $rA", IIC_VecGeneral,
1242 []>;
1243
1244 def MTVSRDD: XX1Form<31, 435, (outs vsrc:$XT), (ins g8rc:$rA, g8rc:$rB),
1245 "mtvsrdd $XT, $rA, $rB", IIC_VecGeneral,
1246 []>, Requires<[In64BitMode]>;
1247
1248 def MFVSRLD: XX1_RS6_RD5_XO<31, 307, (outs g8rc:$rA), (ins vsrc:$XT),
1249 "mfvsrld $rA, $XT", IIC_VecGeneral,
1250 []>, Requires<[In64BitMode]>;
1251
1252 } // IsISA3_0, HasDirectMove
12381253
12391254 /* Direct moves of various widths from GPR's into VSR's. Each move lines
12401255 the value up into element 0 (both BE and LE). Namely, entities smaller than
858858
859859 # CHECK: stxvll 57, 12, 27
860860 0x7f 0x2c 0xdb 0x5b
861
862 # CHECK: mtvsrws 34, 3
863 0x7c 0x43 0x03 0x27
864
865 # CHECK: mtvsrdd 34, 3, 12
866 0x7c 0x43 0x63 0x67
867
868 # CHECK: mfvsrld 3, 34
869 0x7c 0x43 0x02 0x67
948948 # CHECK-BE: stxvll 57, 12, 27 # encoding: [0x7f,0x2c,0xdb,0x5b]
949949 # CHECK-LE: stxvll 57, 12, 27 # encoding: [0x5b,0xdb,0x2c,0x7f]
950950 stxvll 57, 12, 27
951
952 # P9 Direct Move Instructions
953 # CHECK-BE: mtvsrws 34, 3 # encoding: [0x7c,0x43,0x03,0x27]
954 # CHECK-LE: mtvsrws 34, 3 # encoding: [0x27,0x03,0x43,0x7c]
955 mtvsrws 34, 3
956
957 # CHECK-BE: mtvsrdd 34, 3, 12 # encoding: [0x7c,0x43,0x63,0x67]
958 # CHECK-LE: mtvsrdd 34, 3, 12 # encoding: [0x67,0x63,0x43,0x7c]
959 mtvsrdd 34, 3, 12
960
961 # CHECK-BE: mfvsrld 3, 34 # encoding: [0x7c,0x43,0x02,0x67]
962 # CHECK-LE: mfvsrld 3, 34 # encoding: [0x67,0x02,0x43,0x7c]
963 mfvsrld 3, 34