@@ -917,6 +917,7 @@ define void @masked_gather_v32f64(<32 x double>* %a, <32 x double*>* %b) #0 {
917
917
; The above tests test the types, the below tests check that the addressing
918
918
; modes still function
919
919
920
+ ; NOTE: This produces an non-optimal addressing mode due to a temporary workaround
920
921
define void @masked_gather_32b_scaled_sext_f16 (<32 x half >* %a , <32 x i32 >* %b , half * %base ) #0 {
921
922
; CHECK-LABEL: masked_gather_32b_scaled_sext_f16:
922
923
; VBITS_GE_2048: ptrue [[PG0:p[0-9]+]].h, vl32
@@ -925,11 +926,15 @@ define void @masked_gather_32b_scaled_sext_f16(<32 x half>* %a, <32 x i32>* %b,
925
926
; VBITS_GE_2048-NEXT: ld1w { [[PTRS:z[0-9]+]].s }, [[PG1]]/z, [x1]
926
927
; VBITS_GE_2048-NEXT: fcmeq [[CMP:p[0-9]+]].h, [[PG0]]/z, [[VALS]].h, #0.0
927
928
; VBITS_GE_2048-NEXT: mov [[MONE:z[0-9]+]].h, [[CMP]]/z, #-1
928
- ; VBITS_GE_2048-NEXT: uunpklo [[UPK:z[0-9]+]].s, [[MONE]].h
929
- ; VBITS_GE_2048-NEXT: cmpne [[MASK:p[0-9]+]].s, [[PG1]]/z, [[UPK]].s, #0
930
- ; VBITS_GE_2048-NEXT: ld1h { [[RES:z[0-9]+]].s }, [[MASK]]/z, [x2, [[PTRS]].s, sxtw #1]
931
- ; VBITS_GE_2048-NEXT: uzp1 [[UZP:z[0-9]+]].h, [[RES]].h, [[RES]].h
932
- ; VBITS_GE_2048-NEXT: st1h { [[UZP]].h }, [[PG0]], [x0]
929
+ ; VBITS_GE_2048-NEXT: uunpklo [[UPK1:z[0-9]+]].s, [[MONE]].h
930
+ ; VBITS_GE_2048-NEXT: uunpklo [[UPK2:z[0-9]+]].d, [[UPK1]].s
931
+ ; VBITS_GE_2048-NEXT: ptrue [[PG2:p[0-9]+]].d, vl32
932
+ ; VBITS_GE_2048-NEXT: sunpklo [[SEXT:z[0-9]+]].d, [[PTRS]].s
933
+ ; VBITS_GE_2048-NEXT: cmpne [[MASK:p[0-9]+]].d, [[PG2]]/z, [[UPK2]].d, #0
934
+ ; VBITS_GE_2048-NEXT: ld1h { [[RES:z[0-9]+]].d }, [[MASK]]/z, [x2, [[SEXT]].d, lsl #1]
935
+ ; VBITS_GE_2048-NEXT: uzp1 [[UZP1:z[0-9]+]].s, [[RES]].s, [[RES]].s
936
+ ; VBITS_GE_2048-NEXT: uzp1 [[UZP2:z[0-9]+]].h, [[UZP1]].h, [[UZP1]].h
937
+ ; VBITS_GE_2048-NEXT: st1h { [[UZP2]].h }, [[PG0]], [x0]
933
938
; VBITS_GE_2048-NEXT: ret
934
939
%cvals = load <32 x half >, <32 x half >* %a
935
940
%idxs = load <32 x i32 >, <32 x i32 >* %b
@@ -941,14 +946,21 @@ define void @masked_gather_32b_scaled_sext_f16(<32 x half>* %a, <32 x i32>* %b,
941
946
ret void
942
947
}
943
948
949
+ ; NOTE: This produces an non-optimal addressing mode due to a temporary workaround
944
950
define void @masked_gather_32b_scaled_sext_f32 (<32 x float >* %a , <32 x i32 >* %b , float * %base ) #0 {
945
951
; CHECK-LABEL: masked_gather_32b_scaled_sext_f32:
946
- ; VBITS_GE_2048: ptrue [[PG:p[0-9]+]].s, vl32
947
- ; VBITS_GE_2048-NEXT: ld1w { [[VALS:z[0-9]+]].s }, [[PG]]/z, [x0]
948
- ; VBITS_GE_2048-NEXT: ld1w { [[PTRS:z[0-9]+]].s }, [[PG]]/z, [x1]
949
- ; VBITS_GE_2048-NEXT: fcmeq [[MASK:p[0-9]+]].s, [[PG]]/z, [[VALS]].s, #0.0
950
- ; VBITS_GE_2048-NEXT: ld1w { [[RES:z[0-9]+]].s }, [[MASK]]/z, [x2, [[PTRS]].s, sxtw #2]
951
- ; VBITS_GE_2048-NEXT: st1w { [[RES]].s }, [[PG]], [x0]
952
+ ; VBITS_GE_2048: ptrue [[PG0:p[0-9]+]].s, vl32
953
+ ; VBITS_GE_2048-NEXT: ld1w { [[VALS:z[0-9]+]].s }, [[PG0]]/z, [x0]
954
+ ; VBITS_GE_2048-NEXT: ld1w { [[PTRS:z[0-9]+]].s }, [[PG0]]/z, [x1]
955
+ ; VBITS_GE_2048-NEXT: fcmeq [[CMP:p[0-9]+]].s, [[PG0]]/z, [[VALS]].s, #0.0
956
+ ; VBITS_GE_2048-NEXT: sunpklo [[SEXT:z[0-9]+]].d, [[PTRS]].s
957
+ ; VBITS_GE_2048-NEXT: mov [[MONE:z[0-9]+]].s, [[CMP]]/z, #-1
958
+ ; VBITS_GE_2048-NEXT: uunpklo [[UPK:z[0-9]+]].d, [[MONE]].s
959
+ ; VBITS_GE_2048-NEXT: ptrue [[PG1:p[0-9]+]].d, vl32
960
+ ; VBITS_GE_2048-NEXT: cmpne [[MASK:p[0-9]+]].d, [[PG1]]/z, [[UPK]].d, #0
961
+ ; VBITS_GE_2048-NEXT: ld1w { [[RES:z[0-9]+]].d }, [[MASK]]/z, [x2, [[SEXT]].d, lsl #2]
962
+ ; VBITS_GE_2048-NEXT: uzp1 [[UZP:z[0-9]+]].s, [[RES]].s, [[RES]].s
963
+ ; VBITS_GE_2048-NEXT: st1w { [[UZP]].s }, [[PG0]], [x0]
952
964
; VBITS_GE_2048-NEXT: ret
953
965
%cvals = load <32 x float >, <32 x float >* %a
954
966
%idxs = load <32 x i32 >, <32 x i32 >* %b
@@ -960,14 +972,16 @@ define void @masked_gather_32b_scaled_sext_f32(<32 x float>* %a, <32 x i32>* %b,
960
972
ret void
961
973
}
962
974
975
+ ; NOTE: This produces an non-optimal addressing mode due to a temporary workaround
963
976
define void @masked_gather_32b_scaled_sext_f64 (<32 x double >* %a , <32 x i32 >* %b , double * %base ) #0 {
964
977
; CHECK-LABEL: masked_gather_32b_scaled_sext_f64:
965
978
; VBITS_GE_2048: ptrue [[PG0:p[0-9]+]].d, vl32
966
- ; VBITS_GE_2048-NEXT: ld1d { [[VALS:z[0-9]+]].d }, [[PG0]]/z, [x0]
967
979
; VBITS_GE_2048-NEXT: ptrue [[PG1:p[0-9]+]].s, vl32
980
+ ; VBITS_GE_2048-NEXT: ld1d { [[VALS:z[0-9]+]].d }, [[PG0]]/z, [x0]
968
981
; VBITS_GE_2048-NEXT: ld1w { [[PTRS:z[0-9]+]].s }, [[PG1]]/z, [x1]
969
982
; VBITS_GE_2048-NEXT: fcmeq [[MASK:p[0-9]+]].d, [[PG0]]/z, [[VALS]].d, #0.0
970
- ; VBITS_GE_2048-NEXT: ld1d { [[RES:z[0-9]+]].d }, [[MASK]]/z, [x2, [[PTRS]].d, sxtw #3]
983
+ ; VBITS_GE_2048-NEXT: sunpklo [[SEXT:z[0-9]+]].d, [[PTRS]].s
984
+ ; VBITS_GE_2048-NEXT: ld1d { [[RES:z[0-9]+]].d }, [[MASK]]/z, [x2, [[SEXT]].d, lsl #3]
971
985
; VBITS_GE_2048-NEXT: st1d { [[RES]].d }, [[PG0]], [x0]
972
986
; VBITS_GE_2048-NEXT: ret
973
987
%cvals = load <32 x double >, <32 x double >* %a
@@ -980,6 +994,7 @@ define void @masked_gather_32b_scaled_sext_f64(<32 x double>* %a, <32 x i32>* %b
980
994
ret void
981
995
}
982
996
997
+ ; NOTE: This produces an non-optimal addressing mode due to a temporary workaround
983
998
define void @masked_gather_32b_scaled_zext (<32 x half >* %a , <32 x i32 >* %b , half * %base ) #0 {
984
999
; CHECK-LABEL: masked_gather_32b_scaled_zext:
985
1000
; VBITS_GE_2048: ptrue [[PG0:p[0-9]+]].h, vl32
@@ -988,11 +1003,15 @@ define void @masked_gather_32b_scaled_zext(<32 x half>* %a, <32 x i32>* %b, half
988
1003
; VBITS_GE_2048-NEXT: ld1w { [[PTRS:z[0-9]+]].s }, [[PG1]]/z, [x1]
989
1004
; VBITS_GE_2048-NEXT: fcmeq [[CMP:p[0-9]+]].h, [[PG0]]/z, [[VALS]].h, #0.0
990
1005
; VBITS_GE_2048-NEXT: mov [[MONE:z[0-9]+]].h, [[CMP]]/z, #-1
991
- ; VBITS_GE_2048-NEXT: uunpklo [[UPK:z[0-9]+]].s, [[MONE]].h
992
- ; VBITS_GE_2048-NEXT: cmpne [[MASK:p[0-9]+]].s, [[PG1]]/z, [[UPK]].s, #0
993
- ; VBITS_GE_2048-NEXT: ld1h { [[RES:z[0-9]+]].s }, [[MASK]]/z, [x2, [[PTRS]].s, uxtw #1]
994
- ; VBITS_GE_2048-NEXT: uzp1 [[UZP:z[0-9]+]].h, [[RES]].h, [[RES]].h
995
- ; VBITS_GE_2048-NEXT: st1h { [[UZP]].h }, [[PG0]], [x0]
1006
+ ; VBITS_GE_2048-NEXT: uunpklo [[UPK1:z[0-9]+]].s, [[MONE]].h
1007
+ ; VBITS_GE_2048-NEXT: uunpklo [[UPK2:z[0-9]+]].d, [[UPK1]].s
1008
+ ; VBITS_GE_2048-NEXT: ptrue [[PG2:p[0-9]+]].d, vl32
1009
+ ; VBITS_GE_2048-NEXT: uunpklo [[ZEXT:z[0-9]+]].d, [[PTRS]].s
1010
+ ; VBITS_GE_2048-NEXT: cmpne [[MASK:p[0-9]+]].d, [[PG2]]/z, [[UPK2]].d, #0
1011
+ ; VBITS_GE_2048-NEXT: ld1h { [[RES:z[0-9]+]].d }, [[MASK]]/z, [x2, [[ZEXT]].d, lsl #1]
1012
+ ; VBITS_GE_2048-NEXT: uzp1 [[UZP1:z[0-9]+]].s, [[RES]].s, [[RES]].s
1013
+ ; VBITS_GE_2048-NEXT: uzp1 [[UZP2:z[0-9]+]].h, [[UZP1]].h, [[UZP1]].h
1014
+ ; VBITS_GE_2048-NEXT: st1h { [[UZP2]].h }, [[PG0]], [x0]
996
1015
; VBITS_GE_2048-NEXT: ret
997
1016
%cvals = load <32 x half >, <32 x half >* %a
998
1017
%idxs = load <32 x i32 >, <32 x i32 >* %b
@@ -1004,6 +1023,7 @@ define void @masked_gather_32b_scaled_zext(<32 x half>* %a, <32 x i32>* %b, half
1004
1023
ret void
1005
1024
}
1006
1025
1026
+ ; NOTE: This produces an non-optimal addressing mode due to a temporary workaround
1007
1027
define void @masked_gather_32b_unscaled_sext (<32 x half >* %a , <32 x i32 >* %b , i8* %base ) #0 {
1008
1028
; CHECK-LABEL: masked_gather_32b_unscaled_sext:
1009
1029
; VBITS_GE_2048: ptrue [[PG0:p[0-9]+]].h, vl32
@@ -1012,11 +1032,15 @@ define void @masked_gather_32b_unscaled_sext(<32 x half>* %a, <32 x i32>* %b, i8
1012
1032
; VBITS_GE_2048-NEXT: ld1w { [[PTRS:z[0-9]+]].s }, [[PG1]]/z, [x1]
1013
1033
; VBITS_GE_2048-NEXT: fcmeq [[CMP:p[0-9]+]].h, [[PG0]]/z, [[VALS]].h, #0.0
1014
1034
; VBITS_GE_2048-NEXT: mov [[MONE:z[0-9]+]].h, [[CMP]]/z, #-1
1015
- ; VBITS_GE_2048-NEXT: uunpklo [[UPK:z[0-9]+]].s, [[MONE]].h
1016
- ; VBITS_GE_2048-NEXT: cmpne [[MASK:p[0-9]+]].s, [[PG1]]/z, [[UPK]].s, #0
1017
- ; VBITS_GE_2048-NEXT: ld1h { [[RES:z[0-9]+]].s }, [[MASK]]/z, [x2, [[PTRS]].s, sxtw]
1018
- ; VBITS_GE_2048-NEXT: uzp1 [[UZP:z[0-9]+]].h, [[RES]].h, [[RES]].h
1019
- ; VBITS_GE_2048-NEXT: st1h { [[UZP]].h }, [[PG0]], [x0]
1035
+ ; VBITS_GE_2048-NEXT: uunpklo [[UPK1:z[0-9]+]].s, [[MONE]].h
1036
+ ; VBITS_GE_2048-NEXT: uunpklo [[UPK2:z[0-9]+]].d, [[UPK1]].s
1037
+ ; VBITS_GE_2048-NEXT: ptrue [[PG2:p[0-9]+]].d, vl32
1038
+ ; VBITS_GE_2048-NEXT: sunpklo [[SEXT:z[0-9]+]].d, [[PTRS]].s
1039
+ ; VBITS_GE_2048-NEXT: cmpne [[MASK:p[0-9]+]].d, [[PG2]]/z, [[UPK2]].d, #0
1040
+ ; VBITS_GE_2048-NEXT: ld1h { [[RES:z[0-9]+]].d }, [[MASK]]/z, [x2, [[SEXT]].d]
1041
+ ; VBITS_GE_2048-NEXT: uzp1 [[UZP1:z[0-9]+]].s, [[RES]].s, [[RES]].s
1042
+ ; VBITS_GE_2048-NEXT: uzp1 [[UZP2:z[0-9]+]].h, [[UZP1]].h, [[UZP1]].h
1043
+ ; VBITS_GE_2048-NEXT: st1h { [[UZP2]].h }, [[PG0]], [x0]
1020
1044
; VBITS_GE_2048-NEXT: ret
1021
1045
%cvals = load <32 x half >, <32 x half >* %a
1022
1046
%idxs = load <32 x i32 >, <32 x i32 >* %b
@@ -1029,6 +1053,7 @@ define void @masked_gather_32b_unscaled_sext(<32 x half>* %a, <32 x i32>* %b, i8
1029
1053
ret void
1030
1054
}
1031
1055
1056
+ ; NOTE: This produces an non-optimal addressing mode due to a temporary workaround
1032
1057
define void @masked_gather_32b_unscaled_zext (<32 x half >* %a , <32 x i32 >* %b , i8* %base ) #0 {
1033
1058
; CHECK-LABEL: masked_gather_32b_unscaled_zext:
1034
1059
; VBITS_GE_2048: ptrue [[PG0:p[0-9]+]].h, vl32
@@ -1037,11 +1062,15 @@ define void @masked_gather_32b_unscaled_zext(<32 x half>* %a, <32 x i32>* %b, i8
1037
1062
; VBITS_GE_2048-NEXT: ld1w { [[PTRS:z[0-9]+]].s }, [[PG1]]/z, [x1]
1038
1063
; VBITS_GE_2048-NEXT: fcmeq [[CMP:p[0-9]+]].h, [[PG0]]/z, [[VALS]].h, #0.0
1039
1064
; VBITS_GE_2048-NEXT: mov [[MONE:z[0-9]+]].h, [[CMP]]/z, #-1
1040
- ; VBITS_GE_2048-NEXT: uunpklo [[UPK:z[0-9]+]].s, [[MONE]].h
1041
- ; VBITS_GE_2048-NEXT: cmpne [[MASK:p[0-9]+]].s, [[PG1]]/z, [[UPK]].s, #0
1042
- ; VBITS_GE_2048-NEXT: ld1h { [[RES:z[0-9]+]].s }, [[MASK]]/z, [x2, [[PTRS]].s, uxtw]
1043
- ; VBITS_GE_2048-NEXT: uzp1 [[UZP:z[0-9]+]].h, [[RES]].h, [[RES]].h
1044
- ; VBITS_GE_2048-NEXT: st1h { [[UZP]].h }, [[PG0]], [x0]
1065
+ ; VBITS_GE_2048-NEXT: uunpklo [[UPK1:z[0-9]+]].s, [[MONE]].h
1066
+ ; VBITS_GE_2048-NEXT: uunpklo [[UPK2:z[0-9]+]].d, [[UPK1]].s
1067
+ ; VBITS_GE_2048-NEXT: ptrue [[PG2:p[0-9]+]].d, vl32
1068
+ ; VBITS_GE_2048-NEXT: uunpklo [[ZEXT:z[0-9]+]].d, [[PTRS]].s
1069
+ ; VBITS_GE_2048-NEXT: cmpne [[MASK:p[0-9]+]].d, [[PG2]]/z, [[UPK2]].d, #0
1070
+ ; VBITS_GE_2048-NEXT: ld1h { [[RES:z[0-9]+]].d }, [[MASK]]/z, [x2, [[ZEXT]].d]
1071
+ ; VBITS_GE_2048-NEXT: uzp1 [[UZP1:z[0-9]+]].s, [[RES]].s, [[RES]].s
1072
+ ; VBITS_GE_2048-NEXT: uzp1 [[UZP2:z[0-9]+]].h, [[UZP1]].h, [[UZP1]].h
1073
+ ; VBITS_GE_2048-NEXT: st1h { [[UZP2]].h }, [[PG0]], [x0]
1045
1074
; VBITS_GE_2048-NEXT: ret
1046
1075
%cvals = load <32 x half >, <32 x half >* %a
1047
1076
%idxs = load <32 x i32 >, <32 x i32 >* %b
0 commit comments