@@ -880,16 +880,16 @@ fn llvm_fixup_input<'ll, 'tcx>(
880
880
) -> & ' ll Value {
881
881
use InlineAsmRegClass :: * ;
882
882
let dl = & bx. tcx . data_layout ;
883
- match ( reg, layout. abi ) {
884
- ( AArch64 ( AArch64InlineAsmRegClass :: vreg) , Abi :: Scalar ( s) ) => {
883
+ match ( reg, layout. ir_form ) {
884
+ ( AArch64 ( AArch64InlineAsmRegClass :: vreg) , IrForm :: Scalar ( s) ) => {
885
885
if let Primitive :: Int ( Integer :: I8 , _) = s. primitive ( ) {
886
886
let vec_ty = bx. cx . type_vector ( bx. cx . type_i8 ( ) , 8 ) ;
887
887
bx. insert_element ( bx. const_undef ( vec_ty) , value, bx. const_i32 ( 0 ) )
888
888
} else {
889
889
value
890
890
}
891
891
}
892
- ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , Abi :: Scalar ( s) )
892
+ ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , IrForm :: Scalar ( s) )
893
893
if s. primitive ( ) != Primitive :: Float ( Float :: F128 ) =>
894
894
{
895
895
let elem_ty = llvm_asm_scalar_type ( bx. cx , s) ;
@@ -902,30 +902,30 @@ fn llvm_fixup_input<'ll, 'tcx>(
902
902
}
903
903
bx. insert_element ( bx. const_undef ( vec_ty) , value, bx. const_i32 ( 0 ) )
904
904
}
905
- ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , Abi :: Vector { element, count } )
905
+ ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , IrForm :: Vector { element, count } )
906
906
if layout. size . bytes ( ) == 8 =>
907
907
{
908
908
let elem_ty = llvm_asm_scalar_type ( bx. cx , element) ;
909
909
let vec_ty = bx. cx . type_vector ( elem_ty, count) ;
910
910
let indices: Vec < _ > = ( 0 ..count * 2 ) . map ( |x| bx. const_i32 ( x as i32 ) ) . collect ( ) ;
911
911
bx. shuffle_vector ( value, bx. const_undef ( vec_ty) , bx. const_vector ( & indices) )
912
912
}
913
- ( X86 ( X86InlineAsmRegClass :: reg_abcd) , Abi :: Scalar ( s) )
913
+ ( X86 ( X86InlineAsmRegClass :: reg_abcd) , IrForm :: Scalar ( s) )
914
914
if s. primitive ( ) == Primitive :: Float ( Float :: F64 ) =>
915
915
{
916
916
bx. bitcast ( value, bx. cx . type_i64 ( ) )
917
917
}
918
918
(
919
919
X86 ( X86InlineAsmRegClass :: xmm_reg | X86InlineAsmRegClass :: zmm_reg) ,
920
- Abi :: Vector { .. } ,
920
+ IrForm :: Vector { .. } ,
921
921
) if layout. size . bytes ( ) == 64 => bx. bitcast ( value, bx. cx . type_vector ( bx. cx . type_f64 ( ) , 8 ) ) ,
922
922
(
923
923
X86 (
924
924
X86InlineAsmRegClass :: xmm_reg
925
925
| X86InlineAsmRegClass :: ymm_reg
926
926
| X86InlineAsmRegClass :: zmm_reg,
927
927
) ,
928
- Abi :: Scalar ( s) ,
928
+ IrForm :: Scalar ( s) ,
929
929
) if bx. sess ( ) . asm_arch == Some ( InlineAsmArch :: X86 )
930
930
&& s. primitive ( ) == Primitive :: Float ( Float :: F128 ) =>
931
931
{
@@ -937,7 +937,7 @@ fn llvm_fixup_input<'ll, 'tcx>(
937
937
| X86InlineAsmRegClass :: ymm_reg
938
938
| X86InlineAsmRegClass :: zmm_reg,
939
939
) ,
940
- Abi :: Scalar ( s) ,
940
+ IrForm :: Scalar ( s) ,
941
941
) if s. primitive ( ) == Primitive :: Float ( Float :: F16 ) => {
942
942
let value = bx. insert_element (
943
943
bx. const_undef ( bx. type_vector ( bx. type_f16 ( ) , 8 ) ) ,
@@ -952,11 +952,11 @@ fn llvm_fixup_input<'ll, 'tcx>(
952
952
| X86InlineAsmRegClass :: ymm_reg
953
953
| X86InlineAsmRegClass :: zmm_reg,
954
954
) ,
955
- Abi :: Vector { element, count : count @ ( 8 | 16 ) } ,
955
+ IrForm :: Vector { element, count : count @ ( 8 | 16 ) } ,
956
956
) if element. primitive ( ) == Primitive :: Float ( Float :: F16 ) => {
957
957
bx. bitcast ( value, bx. type_vector ( bx. type_i16 ( ) , count) )
958
958
}
959
- ( Arm ( ArmInlineAsmRegClass :: sreg | ArmInlineAsmRegClass :: sreg_low16) , Abi :: Scalar ( s) ) => {
959
+ ( Arm ( ArmInlineAsmRegClass :: sreg | ArmInlineAsmRegClass :: sreg_low16) , IrForm :: Scalar ( s) ) => {
960
960
if let Primitive :: Int ( Integer :: I32 , _) = s. primitive ( ) {
961
961
bx. bitcast ( value, bx. cx . type_f32 ( ) )
962
962
} else {
@@ -969,7 +969,7 @@ fn llvm_fixup_input<'ll, 'tcx>(
969
969
| ArmInlineAsmRegClass :: dreg_low8
970
970
| ArmInlineAsmRegClass :: dreg_low16,
971
971
) ,
972
- Abi :: Scalar ( s) ,
972
+ IrForm :: Scalar ( s) ,
973
973
) => {
974
974
if let Primitive :: Int ( Integer :: I64 , _) = s. primitive ( ) {
975
975
bx. bitcast ( value, bx. cx . type_f64 ( ) )
@@ -986,11 +986,11 @@ fn llvm_fixup_input<'ll, 'tcx>(
986
986
| ArmInlineAsmRegClass :: qreg_low4
987
987
| ArmInlineAsmRegClass :: qreg_low8,
988
988
) ,
989
- Abi :: Vector { element, count : count @ ( 4 | 8 ) } ,
989
+ IrForm :: Vector { element, count : count @ ( 4 | 8 ) } ,
990
990
) if element. primitive ( ) == Primitive :: Float ( Float :: F16 ) => {
991
991
bx. bitcast ( value, bx. type_vector ( bx. type_i16 ( ) , count) )
992
992
}
993
- ( Mips ( MipsInlineAsmRegClass :: reg) , Abi :: Scalar ( s) ) => {
993
+ ( Mips ( MipsInlineAsmRegClass :: reg) , IrForm :: Scalar ( s) ) => {
994
994
match s. primitive ( ) {
995
995
// MIPS only supports register-length arithmetics.
996
996
Primitive :: Int ( Integer :: I8 | Integer :: I16 , _) => bx. zext ( value, bx. cx . type_i32 ( ) ) ,
@@ -999,7 +999,7 @@ fn llvm_fixup_input<'ll, 'tcx>(
999
999
_ => value,
1000
1000
}
1001
1001
}
1002
- ( RiscV ( RiscVInlineAsmRegClass :: freg) , Abi :: Scalar ( s) )
1002
+ ( RiscV ( RiscVInlineAsmRegClass :: freg) , IrForm :: Scalar ( s) )
1003
1003
if s. primitive ( ) == Primitive :: Float ( Float :: F16 )
1004
1004
&& !any_target_feature_enabled ( bx, instance, & [ sym:: zfhmin, sym:: zfh] ) =>
1005
1005
{
@@ -1022,15 +1022,15 @@ fn llvm_fixup_output<'ll, 'tcx>(
1022
1022
instance : Instance < ' _ > ,
1023
1023
) -> & ' ll Value {
1024
1024
use InlineAsmRegClass :: * ;
1025
- match ( reg, layout. abi ) {
1026
- ( AArch64 ( AArch64InlineAsmRegClass :: vreg) , Abi :: Scalar ( s) ) => {
1025
+ match ( reg, layout. ir_form ) {
1026
+ ( AArch64 ( AArch64InlineAsmRegClass :: vreg) , IrForm :: Scalar ( s) ) => {
1027
1027
if let Primitive :: Int ( Integer :: I8 , _) = s. primitive ( ) {
1028
1028
bx. extract_element ( value, bx. const_i32 ( 0 ) )
1029
1029
} else {
1030
1030
value
1031
1031
}
1032
1032
}
1033
- ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , Abi :: Scalar ( s) )
1033
+ ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , IrForm :: Scalar ( s) )
1034
1034
if s. primitive ( ) != Primitive :: Float ( Float :: F128 ) =>
1035
1035
{
1036
1036
value = bx. extract_element ( value, bx. const_i32 ( 0 ) ) ;
@@ -1039,30 +1039,30 @@ fn llvm_fixup_output<'ll, 'tcx>(
1039
1039
}
1040
1040
value
1041
1041
}
1042
- ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , Abi :: Vector { element, count } )
1042
+ ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , IrForm :: Vector { element, count } )
1043
1043
if layout. size . bytes ( ) == 8 =>
1044
1044
{
1045
1045
let elem_ty = llvm_asm_scalar_type ( bx. cx , element) ;
1046
1046
let vec_ty = bx. cx . type_vector ( elem_ty, count * 2 ) ;
1047
1047
let indices: Vec < _ > = ( 0 ..count) . map ( |x| bx. const_i32 ( x as i32 ) ) . collect ( ) ;
1048
1048
bx. shuffle_vector ( value, bx. const_undef ( vec_ty) , bx. const_vector ( & indices) )
1049
1049
}
1050
- ( X86 ( X86InlineAsmRegClass :: reg_abcd) , Abi :: Scalar ( s) )
1050
+ ( X86 ( X86InlineAsmRegClass :: reg_abcd) , IrForm :: Scalar ( s) )
1051
1051
if s. primitive ( ) == Primitive :: Float ( Float :: F64 ) =>
1052
1052
{
1053
1053
bx. bitcast ( value, bx. cx . type_f64 ( ) )
1054
1054
}
1055
1055
(
1056
1056
X86 ( X86InlineAsmRegClass :: xmm_reg | X86InlineAsmRegClass :: zmm_reg) ,
1057
- Abi :: Vector { .. } ,
1057
+ IrForm :: Vector { .. } ,
1058
1058
) if layout. size . bytes ( ) == 64 => bx. bitcast ( value, layout. llvm_type ( bx. cx ) ) ,
1059
1059
(
1060
1060
X86 (
1061
1061
X86InlineAsmRegClass :: xmm_reg
1062
1062
| X86InlineAsmRegClass :: ymm_reg
1063
1063
| X86InlineAsmRegClass :: zmm_reg,
1064
1064
) ,
1065
- Abi :: Scalar ( s) ,
1065
+ IrForm :: Scalar ( s) ,
1066
1066
) if bx. sess ( ) . asm_arch == Some ( InlineAsmArch :: X86 )
1067
1067
&& s. primitive ( ) == Primitive :: Float ( Float :: F128 ) =>
1068
1068
{
@@ -1074,7 +1074,7 @@ fn llvm_fixup_output<'ll, 'tcx>(
1074
1074
| X86InlineAsmRegClass :: ymm_reg
1075
1075
| X86InlineAsmRegClass :: zmm_reg,
1076
1076
) ,
1077
- Abi :: Scalar ( s) ,
1077
+ IrForm :: Scalar ( s) ,
1078
1078
) if s. primitive ( ) == Primitive :: Float ( Float :: F16 ) => {
1079
1079
let value = bx. bitcast ( value, bx. type_vector ( bx. type_f16 ( ) , 8 ) ) ;
1080
1080
bx. extract_element ( value, bx. const_usize ( 0 ) )
@@ -1085,11 +1085,11 @@ fn llvm_fixup_output<'ll, 'tcx>(
1085
1085
| X86InlineAsmRegClass :: ymm_reg
1086
1086
| X86InlineAsmRegClass :: zmm_reg,
1087
1087
) ,
1088
- Abi :: Vector { element, count : count @ ( 8 | 16 ) } ,
1088
+ IrForm :: Vector { element, count : count @ ( 8 | 16 ) } ,
1089
1089
) if element. primitive ( ) == Primitive :: Float ( Float :: F16 ) => {
1090
1090
bx. bitcast ( value, bx. type_vector ( bx. type_f16 ( ) , count) )
1091
1091
}
1092
- ( Arm ( ArmInlineAsmRegClass :: sreg | ArmInlineAsmRegClass :: sreg_low16) , Abi :: Scalar ( s) ) => {
1092
+ ( Arm ( ArmInlineAsmRegClass :: sreg | ArmInlineAsmRegClass :: sreg_low16) , IrForm :: Scalar ( s) ) => {
1093
1093
if let Primitive :: Int ( Integer :: I32 , _) = s. primitive ( ) {
1094
1094
bx. bitcast ( value, bx. cx . type_i32 ( ) )
1095
1095
} else {
@@ -1102,7 +1102,7 @@ fn llvm_fixup_output<'ll, 'tcx>(
1102
1102
| ArmInlineAsmRegClass :: dreg_low8
1103
1103
| ArmInlineAsmRegClass :: dreg_low16,
1104
1104
) ,
1105
- Abi :: Scalar ( s) ,
1105
+ IrForm :: Scalar ( s) ,
1106
1106
) => {
1107
1107
if let Primitive :: Int ( Integer :: I64 , _) = s. primitive ( ) {
1108
1108
bx. bitcast ( value, bx. cx . type_i64 ( ) )
@@ -1119,11 +1119,11 @@ fn llvm_fixup_output<'ll, 'tcx>(
1119
1119
| ArmInlineAsmRegClass :: qreg_low4
1120
1120
| ArmInlineAsmRegClass :: qreg_low8,
1121
1121
) ,
1122
- Abi :: Vector { element, count : count @ ( 4 | 8 ) } ,
1122
+ IrForm :: Vector { element, count : count @ ( 4 | 8 ) } ,
1123
1123
) if element. primitive ( ) == Primitive :: Float ( Float :: F16 ) => {
1124
1124
bx. bitcast ( value, bx. type_vector ( bx. type_f16 ( ) , count) )
1125
1125
}
1126
- ( Mips ( MipsInlineAsmRegClass :: reg) , Abi :: Scalar ( s) ) => {
1126
+ ( Mips ( MipsInlineAsmRegClass :: reg) , IrForm :: Scalar ( s) ) => {
1127
1127
match s. primitive ( ) {
1128
1128
// MIPS only supports register-length arithmetics.
1129
1129
Primitive :: Int ( Integer :: I8 , _) => bx. trunc ( value, bx. cx . type_i8 ( ) ) ,
@@ -1133,7 +1133,7 @@ fn llvm_fixup_output<'ll, 'tcx>(
1133
1133
_ => value,
1134
1134
}
1135
1135
}
1136
- ( RiscV ( RiscVInlineAsmRegClass :: freg) , Abi :: Scalar ( s) )
1136
+ ( RiscV ( RiscVInlineAsmRegClass :: freg) , IrForm :: Scalar ( s) )
1137
1137
if s. primitive ( ) == Primitive :: Float ( Float :: F16 )
1138
1138
&& !any_target_feature_enabled ( bx, instance, & [ sym:: zfhmin, sym:: zfh] ) =>
1139
1139
{
@@ -1153,43 +1153,43 @@ fn llvm_fixup_output_type<'ll, 'tcx>(
1153
1153
instance : Instance < ' _ > ,
1154
1154
) -> & ' ll Type {
1155
1155
use InlineAsmRegClass :: * ;
1156
- match ( reg, layout. abi ) {
1157
- ( AArch64 ( AArch64InlineAsmRegClass :: vreg) , Abi :: Scalar ( s) ) => {
1156
+ match ( reg, layout. ir_form ) {
1157
+ ( AArch64 ( AArch64InlineAsmRegClass :: vreg) , IrForm :: Scalar ( s) ) => {
1158
1158
if let Primitive :: Int ( Integer :: I8 , _) = s. primitive ( ) {
1159
1159
cx. type_vector ( cx. type_i8 ( ) , 8 )
1160
1160
} else {
1161
1161
layout. llvm_type ( cx)
1162
1162
}
1163
1163
}
1164
- ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , Abi :: Scalar ( s) )
1164
+ ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , IrForm :: Scalar ( s) )
1165
1165
if s. primitive ( ) != Primitive :: Float ( Float :: F128 ) =>
1166
1166
{
1167
1167
let elem_ty = llvm_asm_scalar_type ( cx, s) ;
1168
1168
let count = 16 / layout. size . bytes ( ) ;
1169
1169
cx. type_vector ( elem_ty, count)
1170
1170
}
1171
- ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , Abi :: Vector { element, count } )
1171
+ ( AArch64 ( AArch64InlineAsmRegClass :: vreg_low16) , IrForm :: Vector { element, count } )
1172
1172
if layout. size . bytes ( ) == 8 =>
1173
1173
{
1174
1174
let elem_ty = llvm_asm_scalar_type ( cx, element) ;
1175
1175
cx. type_vector ( elem_ty, count * 2 )
1176
1176
}
1177
- ( X86 ( X86InlineAsmRegClass :: reg_abcd) , Abi :: Scalar ( s) )
1177
+ ( X86 ( X86InlineAsmRegClass :: reg_abcd) , IrForm :: Scalar ( s) )
1178
1178
if s. primitive ( ) == Primitive :: Float ( Float :: F64 ) =>
1179
1179
{
1180
1180
cx. type_i64 ( )
1181
1181
}
1182
1182
(
1183
1183
X86 ( X86InlineAsmRegClass :: xmm_reg | X86InlineAsmRegClass :: zmm_reg) ,
1184
- Abi :: Vector { .. } ,
1184
+ IrForm :: Vector { .. } ,
1185
1185
) if layout. size . bytes ( ) == 64 => cx. type_vector ( cx. type_f64 ( ) , 8 ) ,
1186
1186
(
1187
1187
X86 (
1188
1188
X86InlineAsmRegClass :: xmm_reg
1189
1189
| X86InlineAsmRegClass :: ymm_reg
1190
1190
| X86InlineAsmRegClass :: zmm_reg,
1191
1191
) ,
1192
- Abi :: Scalar ( s) ,
1192
+ IrForm :: Scalar ( s) ,
1193
1193
) if cx. sess ( ) . asm_arch == Some ( InlineAsmArch :: X86 )
1194
1194
&& s. primitive ( ) == Primitive :: Float ( Float :: F128 ) =>
1195
1195
{
@@ -1201,19 +1201,19 @@ fn llvm_fixup_output_type<'ll, 'tcx>(
1201
1201
| X86InlineAsmRegClass :: ymm_reg
1202
1202
| X86InlineAsmRegClass :: zmm_reg,
1203
1203
) ,
1204
- Abi :: Scalar ( s) ,
1204
+ IrForm :: Scalar ( s) ,
1205
1205
) if s. primitive ( ) == Primitive :: Float ( Float :: F16 ) => cx. type_vector ( cx. type_i16 ( ) , 8 ) ,
1206
1206
(
1207
1207
X86 (
1208
1208
X86InlineAsmRegClass :: xmm_reg
1209
1209
| X86InlineAsmRegClass :: ymm_reg
1210
1210
| X86InlineAsmRegClass :: zmm_reg,
1211
1211
) ,
1212
- Abi :: Vector { element, count : count @ ( 8 | 16 ) } ,
1212
+ IrForm :: Vector { element, count : count @ ( 8 | 16 ) } ,
1213
1213
) if element. primitive ( ) == Primitive :: Float ( Float :: F16 ) => {
1214
1214
cx. type_vector ( cx. type_i16 ( ) , count)
1215
1215
}
1216
- ( Arm ( ArmInlineAsmRegClass :: sreg | ArmInlineAsmRegClass :: sreg_low16) , Abi :: Scalar ( s) ) => {
1216
+ ( Arm ( ArmInlineAsmRegClass :: sreg | ArmInlineAsmRegClass :: sreg_low16) , IrForm :: Scalar ( s) ) => {
1217
1217
if let Primitive :: Int ( Integer :: I32 , _) = s. primitive ( ) {
1218
1218
cx. type_f32 ( )
1219
1219
} else {
@@ -1226,7 +1226,7 @@ fn llvm_fixup_output_type<'ll, 'tcx>(
1226
1226
| ArmInlineAsmRegClass :: dreg_low8
1227
1227
| ArmInlineAsmRegClass :: dreg_low16,
1228
1228
) ,
1229
- Abi :: Scalar ( s) ,
1229
+ IrForm :: Scalar ( s) ,
1230
1230
) => {
1231
1231
if let Primitive :: Int ( Integer :: I64 , _) = s. primitive ( ) {
1232
1232
cx. type_f64 ( )
@@ -1243,11 +1243,11 @@ fn llvm_fixup_output_type<'ll, 'tcx>(
1243
1243
| ArmInlineAsmRegClass :: qreg_low4
1244
1244
| ArmInlineAsmRegClass :: qreg_low8,
1245
1245
) ,
1246
- Abi :: Vector { element, count : count @ ( 4 | 8 ) } ,
1246
+ IrForm :: Vector { element, count : count @ ( 4 | 8 ) } ,
1247
1247
) if element. primitive ( ) == Primitive :: Float ( Float :: F16 ) => {
1248
1248
cx. type_vector ( cx. type_i16 ( ) , count)
1249
1249
}
1250
- ( Mips ( MipsInlineAsmRegClass :: reg) , Abi :: Scalar ( s) ) => {
1250
+ ( Mips ( MipsInlineAsmRegClass :: reg) , IrForm :: Scalar ( s) ) => {
1251
1251
match s. primitive ( ) {
1252
1252
// MIPS only supports register-length arithmetics.
1253
1253
Primitive :: Int ( Integer :: I8 | Integer :: I16 , _) => cx. type_i32 ( ) ,
@@ -1256,7 +1256,7 @@ fn llvm_fixup_output_type<'ll, 'tcx>(
1256
1256
_ => layout. llvm_type ( cx) ,
1257
1257
}
1258
1258
}
1259
- ( RiscV ( RiscVInlineAsmRegClass :: freg) , Abi :: Scalar ( s) )
1259
+ ( RiscV ( RiscVInlineAsmRegClass :: freg) , IrForm :: Scalar ( s) )
1260
1260
if s. primitive ( ) == Primitive :: Float ( Float :: F16 )
1261
1261
&& !any_target_feature_enabled ( cx, instance, & [ sym:: zfhmin, sym:: zfh] ) =>
1262
1262
{
0 commit comments