@@ -814,16 +814,16 @@ attributes #2 = { alwaysinline nounwind }
814
814
; CHECK-SAME: (void ()** [[OUT:%.*]]) #[[ATTR0]] {
815
815
; CHECK-NEXT: [[FUNC:%.*]] = load i32 ()*, i32 ()** undef, align 8
816
816
; CHECK-NEXT: [[CAST:%.*]] = bitcast void ()** [[OUT]] to i32 ()**
817
- ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i32 ()* [[FUNC]] to void ()*
818
- ; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[BITCAST_FUNC_PTR_TYPE:%.*]] undef, void ()* [[TMP1]], 0
819
- ; CHECK-NEXT: ret [[BITCAST_FUNC_PTR_TYPE]] [[TMP2]]
817
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_FUNC_PTR_TYPE:%.*]] undef, i32 ()* [[FUNC]], 0
818
+ ; CHECK-NEXT: ret [[BITCAST_FUNC_PTR_TYPE]] [[TMP1]]
820
819
;
821
820
;
822
821
; CHECK-LABEL: define {{[^@]+}}@bitcast_func_ptr_type
823
822
; CHECK-SAME: (void ()** [[TMP0:%.*]]) #[[ATTR2]] {
824
823
; CHECK-NEXT: [[TMP2:%.*]] = call [[BITCAST_FUNC_PTR_TYPE:%.*]] @bitcast_func_ptr_type.body(void ()** undef)
825
824
; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[BITCAST_FUNC_PTR_TYPE]] [[TMP2]], 0
826
- ; CHECK-NEXT: store void ()* [[TMP3]], void ()** [[TMP0]], align 8
825
+ ; CHECK-NEXT: [[TMP4:%.*]] = bitcast void ()** [[TMP0]] to i32 ()**
826
+ ; CHECK-NEXT: store i32 ()* [[TMP3]], i32 ()** [[TMP4]], align 8
827
827
; CHECK-NEXT: ret void
828
828
;
829
829
;
@@ -925,201 +925,248 @@ attributes #2 = { alwaysinline nounwind }
925
925
; CHECK-SAME: (<3 x i32>* [[OUT:%.*]]) #[[ATTR0]] {
926
926
; CHECK-NEXT: [[LOAD:%.*]] = load volatile <4 x i32>, <4 x i32> addrspace(1)* undef, align 16
927
927
; CHECK-NEXT: [[BITCAST:%.*]] = bitcast <3 x i32>* [[OUT]] to <4 x i32>*
928
- ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[LOAD]], <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
929
- ; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[BITCAST_POINTER_V4I32_V3I32:%.*]] undef, <3 x i32> [[TMP1]], 0
930
- ; CHECK-NEXT: ret [[BITCAST_POINTER_V4I32_V3I32]] [[TMP2]]
928
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_POINTER_V4I32_V3I32:%.*]] undef, <4 x i32> [[LOAD]], 0
929
+ ; CHECK-NEXT: ret [[BITCAST_POINTER_V4I32_V3I32]] [[TMP1]]
931
930
;
932
931
;
933
932
; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_v4i32_v3i32
934
933
; CHECK-SAME: (<3 x i32>* [[TMP0:%.*]]) #[[ATTR2]] {
935
934
; CHECK-NEXT: [[TMP2:%.*]] = call [[BITCAST_POINTER_V4I32_V3I32:%.*]] @bitcast_pointer_v4i32_v3i32.body(<3 x i32>* undef)
936
935
; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[BITCAST_POINTER_V4I32_V3I32]] [[TMP2]], 0
937
- ; CHECK-NEXT: store <3 x i32> [[TMP3]], <3 x i32>* [[TMP0]], align 16
936
+ ; CHECK-NEXT: [[TMP4:%.*]] = bitcast <3 x i32>* [[TMP0]] to <4 x i32>*
937
+ ; CHECK-NEXT: store <4 x i32> [[TMP3]], <4 x i32>* [[TMP4]], align 16
938
938
; CHECK-NEXT: ret void
939
939
;
940
940
;
941
941
; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_v4i32_v3f32.body
942
942
; CHECK-SAME: (<3 x float>* [[OUT:%.*]]) #[[ATTR0]] {
943
943
; CHECK-NEXT: [[LOAD:%.*]] = load volatile <4 x i32>, <4 x i32> addrspace(1)* undef, align 16
944
944
; CHECK-NEXT: [[BITCAST:%.*]] = bitcast <3 x float>* [[OUT]] to <4 x i32>*
945
- ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[LOAD]], <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
946
- ; CHECK-NEXT: [[TMP2:%.*]] = bitcast <3 x i32> [[TMP1]] to <3 x float>
947
- ; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[BITCAST_POINTER_V4I32_V3F32:%.*]] undef, <3 x float> [[TMP2]], 0
948
- ; CHECK-NEXT: ret [[BITCAST_POINTER_V4I32_V3F32]] [[TMP3]]
945
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_POINTER_V4I32_V3F32:%.*]] undef, <4 x i32> [[LOAD]], 0
946
+ ; CHECK-NEXT: ret [[BITCAST_POINTER_V4I32_V3F32]] [[TMP1]]
949
947
;
950
948
;
951
949
; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_v4i32_v3f32
952
950
; CHECK-SAME: (<3 x float>* [[TMP0:%.*]]) #[[ATTR2]] {
953
951
; CHECK-NEXT: [[TMP2:%.*]] = call [[BITCAST_POINTER_V4I32_V3F32:%.*]] @bitcast_pointer_v4i32_v3f32.body(<3 x float>* undef)
954
952
; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[BITCAST_POINTER_V4I32_V3F32]] [[TMP2]], 0
955
- ; CHECK-NEXT: store <3 x float> [[TMP3]], <3 x float>* [[TMP0]], align 16
953
+ ; CHECK-NEXT: [[TMP4:%.*]] = bitcast <3 x float>* [[TMP0]] to <4 x i32>*
954
+ ; CHECK-NEXT: store <4 x i32> [[TMP3]], <4 x i32>* [[TMP4]], align 16
956
955
; CHECK-NEXT: ret void
957
956
;
958
957
;
959
958
; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_i32_f32.body
960
959
; CHECK-SAME: (float* [[OUT:%.*]]) #[[ATTR0]] {
961
960
; CHECK-NEXT: [[LOAD:%.*]] = load volatile i32, i32 addrspace(1)* undef, align 4
962
961
; CHECK-NEXT: [[BITCAST:%.*]] = bitcast float* [[OUT]] to i32*
963
- ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i32 [[LOAD]] to float
964
- ; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[BITCAST_POINTER_I32_F32:%.*]] undef, float [[TMP1]], 0
965
- ; CHECK-NEXT: ret [[BITCAST_POINTER_I32_F32]] [[TMP2]]
962
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_POINTER_I32_F32:%.*]] undef, i32 [[LOAD]], 0
963
+ ; CHECK-NEXT: ret [[BITCAST_POINTER_I32_F32]] [[TMP1]]
966
964
;
967
965
;
968
966
; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_i32_f32
969
967
; CHECK-SAME: (float* [[TMP0:%.*]]) #[[ATTR2]] {
970
968
; CHECK-NEXT: [[TMP2:%.*]] = call [[BITCAST_POINTER_I32_F32:%.*]] @bitcast_pointer_i32_f32.body(float* undef)
971
969
; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[BITCAST_POINTER_I32_F32]] [[TMP2]], 0
972
- ; CHECK-NEXT: store float [[TMP3]], float* [[TMP0]], align 4
970
+ ; CHECK-NEXT: [[TMP4:%.*]] = bitcast float* [[TMP0]] to i32*
971
+ ; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP4]], align 4
973
972
; CHECK-NEXT: ret void
974
973
;
975
974
;
976
- ; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_i32_f16
975
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_i32_f16.body
977
976
; CHECK-SAME: (half* [[OUT:%.*]]) #[[ATTR0]] {
978
977
; CHECK-NEXT: [[LOAD:%.*]] = load volatile i32, i32 addrspace(1)* undef, align 4
979
978
; CHECK-NEXT: [[BITCAST:%.*]] = bitcast half* [[OUT]] to i32*
980
- ; CHECK-NEXT: store i32 [[LOAD]], i32* [[BITCAST]], align 4
979
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_POINTER_I32_F16:%.*]] undef, i32 [[LOAD]], 0
980
+ ; CHECK-NEXT: ret [[BITCAST_POINTER_I32_F16]] [[TMP1]]
981
+ ;
982
+ ;
983
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_i32_f16
984
+ ; CHECK-SAME: (half* [[TMP0:%.*]]) #[[ATTR2]] {
985
+ ; CHECK-NEXT: [[TMP2:%.*]] = call [[BITCAST_POINTER_I32_F16:%.*]] @bitcast_pointer_i32_f16.body(half* undef)
986
+ ; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[BITCAST_POINTER_I32_F16]] [[TMP2]], 0
987
+ ; CHECK-NEXT: [[TMP4:%.*]] = bitcast half* [[TMP0]] to i32*
988
+ ; CHECK-NEXT: store i32 [[TMP3]], i32* [[TMP4]], align 4
981
989
; CHECK-NEXT: ret void
982
990
;
983
991
;
984
- ; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_f16_i32
992
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_f16_i32.body
985
993
; CHECK-SAME: (i32* [[OUT:%.*]]) #[[ATTR0]] {
986
994
; CHECK-NEXT: [[LOAD:%.*]] = load volatile half, half addrspace(1)* undef, align 2
987
995
; CHECK-NEXT: [[BITCAST:%.*]] = bitcast i32* [[OUT]] to half*
988
- ; CHECK-NEXT: store half [[LOAD]], half* [[BITCAST]], align 2
996
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_POINTER_F16_I32:%.*]] undef, half [[LOAD]], 0
997
+ ; CHECK-NEXT: ret [[BITCAST_POINTER_F16_I32]] [[TMP1]]
998
+ ;
999
+ ;
1000
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_pointer_f16_i32
1001
+ ; CHECK-SAME: (i32* [[TMP0:%.*]]) #[[ATTR2]] {
1002
+ ; CHECK-NEXT: [[TMP2:%.*]] = call [[BITCAST_POINTER_F16_I32:%.*]] @bitcast_pointer_f16_i32.body(i32* undef)
1003
+ ; CHECK-NEXT: [[TMP3:%.*]] = extractvalue [[BITCAST_POINTER_F16_I32]] [[TMP2]], 0
1004
+ ; CHECK-NEXT: [[TMP4:%.*]] = bitcast i32* [[TMP0]] to half*
1005
+ ; CHECK-NEXT: store half [[TMP3]], half* [[TMP4]], align 2
989
1006
; CHECK-NEXT: ret void
990
1007
;
991
1008
;
992
1009
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v3f32.body
993
1010
; CHECK-SAME: (%struct.v3f32* [[OUT:%.*]], <3 x float> [[VALUE:%.*]]) #[[ATTR0]] {
994
1011
; CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <3 x float> [[VALUE]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
995
1012
; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32* [[OUT]] to <4 x float>*
996
- ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[EXTRACTVEC]], <4 x float> poison, <3 x i32> <i32 0, i32 1, i32 2>
997
- ; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[STRUCT_V3F32:%.*]] undef, <3 x float> [[TMP1]], 0
998
- ; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_V3F32:%.*]] undef, [[STRUCT_V3F32]] [[TMP2]], 0
999
- ; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_V3F32]] [[TMP3]]
1013
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_V3F32:%.*]] undef, <4 x float> [[EXTRACTVEC]], 0
1014
+ ; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_V3F32]] [[TMP1]]
1000
1015
;
1001
1016
;
1002
1017
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v3f32
1003
1018
; CHECK-SAME: (%struct.v3f32* [[TMP0:%.*]], <3 x float> [[TMP1:%.*]]) #[[ATTR2]] {
1004
1019
; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V3F32_V3F32:%.*]] @bitcast_struct_v3f32_v3f32.body(%struct.v3f32* undef, <3 x float> [[TMP1]])
1005
1020
; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V3F32_V3F32]] [[TMP3]], 0
1006
- ; CHECK-NEXT: store [[STRUCT_V3F32:%.*]] [[TMP4]], %struct.v3f32* [[TMP0]], align 16
1021
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast %struct.v3f32* [[TMP0]] to <4 x float>*
1022
+ ; CHECK-NEXT: store <4 x float> [[TMP4]], <4 x float>* [[TMP5]], align 16
1007
1023
; CHECK-NEXT: ret void
1008
1024
;
1009
1025
;
1010
1026
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v3i32.body
1011
1027
; CHECK-SAME: (%struct.v3f32* [[OUT:%.*]], <3 x i32> [[VALUE:%.*]]) #[[ATTR0]] {
1012
1028
; CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <3 x i32> [[VALUE]], <3 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
1013
1029
; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32* [[OUT]] to <4 x i32>*
1014
- ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[EXTRACTVEC]], <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
1015
- ; CHECK-NEXT: [[TMP2:%.*]] = bitcast <3 x i32> [[TMP1]] to <3 x float>
1016
- ; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[STRUCT_V3F32:%.*]] undef, <3 x float> [[TMP2]], 0
1017
- ; CHECK-NEXT: [[TMP4:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_V3I32:%.*]] undef, [[STRUCT_V3F32]] [[TMP3]], 0
1018
- ; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_V3I32]] [[TMP4]]
1030
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_V3I32:%.*]] undef, <4 x i32> [[EXTRACTVEC]], 0
1031
+ ; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_V3I32]] [[TMP1]]
1019
1032
;
1020
1033
;
1021
1034
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v3i32
1022
1035
; CHECK-SAME: (%struct.v3f32* [[TMP0:%.*]], <3 x i32> [[TMP1:%.*]]) #[[ATTR2]] {
1023
1036
; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V3F32_V3I32:%.*]] @bitcast_struct_v3f32_v3i32.body(%struct.v3f32* undef, <3 x i32> [[TMP1]])
1024
1037
; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V3F32_V3I32]] [[TMP3]], 0
1025
- ; CHECK-NEXT: store [[STRUCT_V3F32:%.*]] [[TMP4]], %struct.v3f32* [[TMP0]], align 16
1038
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast %struct.v3f32* [[TMP0]] to <4 x i32>*
1039
+ ; CHECK-NEXT: store <4 x i32> [[TMP4]], <4 x i32>* [[TMP5]], align 16
1026
1040
; CHECK-NEXT: ret void
1027
1041
;
1028
1042
;
1029
1043
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v4f32_v4f32.body
1030
1044
; CHECK-SAME: (%struct.v4f32* [[OUT:%.*]], <4 x float> [[VALUE:%.*]]) #[[ATTR0]] {
1031
1045
; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v4f32* [[OUT]] to <4 x float>*
1032
- ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[STRUCT_V4F32:%.*]] undef, <4 x float> [[VALUE]], 0
1033
- ; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[BITCAST_STRUCT_V4F32_V4F32:%.*]] undef, [[STRUCT_V4F32]] [[TMP1]], 0
1034
- ; CHECK-NEXT: ret [[BITCAST_STRUCT_V4F32_V4F32]] [[TMP2]]
1046
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_STRUCT_V4F32_V4F32:%.*]] undef, <4 x float> [[VALUE]], 0
1047
+ ; CHECK-NEXT: ret [[BITCAST_STRUCT_V4F32_V4F32]] [[TMP1]]
1035
1048
;
1036
1049
;
1037
1050
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v4f32_v4f32
1038
1051
; CHECK-SAME: (%struct.v4f32* [[TMP0:%.*]], <4 x float> [[TMP1:%.*]]) #[[ATTR2]] {
1039
1052
; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V4F32_V4F32:%.*]] @bitcast_struct_v4f32_v4f32.body(%struct.v4f32* undef, <4 x float> [[TMP1]])
1040
1053
; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V4F32_V4F32]] [[TMP3]], 0
1041
- ; CHECK-NEXT: store [[STRUCT_V4F32:%.*]] [[TMP4]], %struct.v4f32* [[TMP0]], align 16
1054
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast %struct.v4f32* [[TMP0]] to <4 x float>*
1055
+ ; CHECK-NEXT: store <4 x float> [[TMP4]], <4 x float>* [[TMP5]], align 16
1042
1056
; CHECK-NEXT: ret void
1043
1057
;
1044
1058
;
1045
1059
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v4i32.body
1046
1060
; CHECK-SAME: (%struct.v3f32* [[OUT:%.*]], <4 x i32> [[VALUE:%.*]]) #[[ATTR0]] {
1047
1061
; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32* [[OUT]] to <4 x i32>*
1048
- ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x i32> [[VALUE]], <4 x i32> poison, <3 x i32> <i32 0, i32 1, i32 2>
1049
- ; CHECK-NEXT: [[TMP2:%.*]] = bitcast <3 x i32> [[TMP1]] to <3 x float>
1050
- ; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[STRUCT_V3F32:%.*]] undef, <3 x float> [[TMP2]], 0
1051
- ; CHECK-NEXT: [[TMP4:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_V4I32:%.*]] undef, [[STRUCT_V3F32]] [[TMP3]], 0
1052
- ; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_V4I32]] [[TMP4]]
1062
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_V4I32:%.*]] undef, <4 x i32> [[VALUE]], 0
1063
+ ; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_V4I32]] [[TMP1]]
1053
1064
;
1054
1065
;
1055
1066
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v4i32
1056
1067
; CHECK-SAME: (%struct.v3f32* [[TMP0:%.*]], <4 x i32> [[TMP1:%.*]]) #[[ATTR2]] {
1057
1068
; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V3F32_V4I32:%.*]] @bitcast_struct_v3f32_v4i32.body(%struct.v3f32* undef, <4 x i32> [[TMP1]])
1058
1069
; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V3F32_V4I32]] [[TMP3]], 0
1059
- ; CHECK-NEXT: store [[STRUCT_V3F32:%.*]] [[TMP4]], %struct.v3f32* [[TMP0]], align 16
1070
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast %struct.v3f32* [[TMP0]] to <4 x i32>*
1071
+ ; CHECK-NEXT: store <4 x i32> [[TMP4]], <4 x i32>* [[TMP5]], align 16
1060
1072
; CHECK-NEXT: ret void
1061
1073
;
1062
1074
;
1063
1075
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v4f32_v3f32.body
1064
1076
; CHECK-SAME: (%struct.v4f32* [[OUT:%.*]], <3 x float> [[VALUE:%.*]]) #[[ATTR0]] {
1065
1077
; CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <3 x float> [[VALUE]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
1066
1078
; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v4f32* [[OUT]] to <4 x float>*
1067
- ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[STRUCT_V4F32:%.*]] undef, <4 x float> [[EXTRACTVEC]], 0
1068
- ; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[BITCAST_STRUCT_V4F32_V3F32:%.*]] undef, [[STRUCT_V4F32]] [[TMP1]], 0
1069
- ; CHECK-NEXT: ret [[BITCAST_STRUCT_V4F32_V3F32]] [[TMP2]]
1079
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_STRUCT_V4F32_V3F32:%.*]] undef, <4 x float> [[EXTRACTVEC]], 0
1080
+ ; CHECK-NEXT: ret [[BITCAST_STRUCT_V4F32_V3F32]] [[TMP1]]
1070
1081
;
1071
1082
;
1072
1083
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v4f32_v3f32
1073
1084
; CHECK-SAME: (%struct.v4f32* [[TMP0:%.*]], <3 x float> [[TMP1:%.*]]) #[[ATTR2]] {
1074
1085
; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V4F32_V3F32:%.*]] @bitcast_struct_v4f32_v3f32.body(%struct.v4f32* undef, <3 x float> [[TMP1]])
1075
1086
; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V4F32_V3F32]] [[TMP3]], 0
1076
- ; CHECK-NEXT: store [[STRUCT_V4F32:%.*]] [[TMP4]], %struct.v4f32* [[TMP0]], align 16
1087
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast %struct.v4f32* [[TMP0]] to <4 x float>*
1088
+ ; CHECK-NEXT: store <4 x float> [[TMP4]], <4 x float>* [[TMP5]], align 16
1077
1089
; CHECK-NEXT: ret void
1078
1090
;
1079
1091
;
1080
- ; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v2f32
1092
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v2f32.body
1081
1093
; CHECK-SAME: (%struct.v3f32* [[OUT:%.*]], <2 x float> [[VALUE:%.*]]) #[[ATTR0]] {
1082
1094
; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32* [[OUT]] to <2 x float>*
1083
- ; CHECK-NEXT: store <2 x float> [[VALUE]], <2 x float>* [[CAST]], align 8
1095
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_V2F32:%.*]] undef, <2 x float> [[VALUE]], 0
1096
+ ; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_V2F32]] [[TMP1]]
1097
+ ;
1098
+ ;
1099
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_v2f32
1100
+ ; CHECK-SAME: (%struct.v3f32* [[TMP0:%.*]], <2 x float> [[TMP1:%.*]]) #[[ATTR2]] {
1101
+ ; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V3F32_V2F32:%.*]] @bitcast_struct_v3f32_v2f32.body(%struct.v3f32* undef, <2 x float> [[TMP1]])
1102
+ ; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V3F32_V2F32]] [[TMP3]], 0
1103
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast %struct.v3f32* [[TMP0]] to <2 x float>*
1104
+ ; CHECK-NEXT: store <2 x float> [[TMP4]], <2 x float>* [[TMP5]], align 8
1084
1105
; CHECK-NEXT: ret void
1085
1106
;
1086
1107
;
1087
- ; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_f32_v3f32
1108
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_f32_v3f32.body
1088
1109
; CHECK-SAME: (%struct.v3f32.f32* [[OUT:%.*]], <3 x float> [[VALUE:%.*]]) #[[ATTR0]] {
1089
1110
; CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <3 x float> [[VALUE]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
1090
1111
; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32.f32* [[OUT]] to <4 x float>*
1091
- ; CHECK-NEXT: store <4 x float> [[EXTRACTVEC]], <4 x float>* [[CAST]], align 16
1112
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_F32_V3F32:%.*]] undef, <4 x float> [[EXTRACTVEC]], 0
1113
+ ; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_F32_V3F32]] [[TMP1]]
1114
+ ;
1115
+ ;
1116
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_f32_v3f32
1117
+ ; CHECK-SAME: (%struct.v3f32.f32* [[TMP0:%.*]], <3 x float> [[TMP1:%.*]]) #[[ATTR2]] {
1118
+ ; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V3F32_F32_V3F32:%.*]] @bitcast_struct_v3f32_f32_v3f32.body(%struct.v3f32.f32* undef, <3 x float> [[TMP1]])
1119
+ ; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V3F32_F32_V3F32]] [[TMP3]], 0
1120
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast %struct.v3f32.f32* [[TMP0]] to <4 x float>*
1121
+ ; CHECK-NEXT: store <4 x float> [[TMP4]], <4 x float>* [[TMP5]], align 16
1092
1122
; CHECK-NEXT: ret void
1093
1123
;
1094
1124
;
1095
- ; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_f32_v4f32
1125
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_f32_v4f32.body
1096
1126
; CHECK-SAME: (%struct.v3f32.f32* [[OUT:%.*]], <4 x float> [[VALUE:%.*]]) #[[ATTR0]] {
1097
1127
; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.v3f32.f32* [[OUT]] to <4 x float>*
1098
- ; CHECK-NEXT: store <4 x float> [[VALUE]], <4 x float>* [[CAST]], align 16
1128
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_STRUCT_V3F32_F32_V4F32:%.*]] undef, <4 x float> [[VALUE]], 0
1129
+ ; CHECK-NEXT: ret [[BITCAST_STRUCT_V3F32_F32_V4F32]] [[TMP1]]
1130
+ ;
1131
+ ;
1132
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_v3f32_f32_v4f32
1133
+ ; CHECK-SAME: (%struct.v3f32.f32* [[TMP0:%.*]], <4 x float> [[TMP1:%.*]]) #[[ATTR2]] {
1134
+ ; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_V3F32_F32_V4F32:%.*]] @bitcast_struct_v3f32_f32_v4f32.body(%struct.v3f32.f32* undef, <4 x float> [[TMP1]])
1135
+ ; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_V3F32_F32_V4F32]] [[TMP3]], 0
1136
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast %struct.v3f32.f32* [[TMP0]] to <4 x float>*
1137
+ ; CHECK-NEXT: store <4 x float> [[TMP4]], <4 x float>* [[TMP5]], align 16
1099
1138
; CHECK-NEXT: ret void
1100
1139
;
1101
1140
;
1102
1141
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_i128_v4f32.body
1103
1142
; CHECK-SAME: (%struct.i128* [[OUT:%.*]], <4 x float> [[VALUE:%.*]]) #[[ATTR0]] {
1104
1143
; CHECK-NEXT: [[CAST:%.*]] = bitcast %struct.i128* [[OUT]] to <4 x float>*
1105
- ; CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x float> [[VALUE]] to i128
1106
- ; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[STRUCT_I128:%.*]] undef, i128 [[TMP1]], 0
1107
- ; CHECK-NEXT: [[TMP3:%.*]] = insertvalue [[BITCAST_STRUCT_I128_V4F32:%.*]] undef, [[STRUCT_I128]] [[TMP2]], 0
1108
- ; CHECK-NEXT: ret [[BITCAST_STRUCT_I128_V4F32]] [[TMP3]]
1144
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_STRUCT_I128_V4F32:%.*]] undef, <4 x float> [[VALUE]], 0
1145
+ ; CHECK-NEXT: ret [[BITCAST_STRUCT_I128_V4F32]] [[TMP1]]
1109
1146
;
1110
1147
;
1111
1148
; CHECK-LABEL: define {{[^@]+}}@bitcast_struct_i128_v4f32
1112
1149
; CHECK-SAME: (%struct.i128* [[TMP0:%.*]], <4 x float> [[TMP1:%.*]]) #[[ATTR2]] {
1113
1150
; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_STRUCT_I128_V4F32:%.*]] @bitcast_struct_i128_v4f32.body(%struct.i128* undef, <4 x float> [[TMP1]])
1114
1151
; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_STRUCT_I128_V4F32]] [[TMP3]], 0
1115
- ; CHECK-NEXT: store [[STRUCT_I128:%.*]] [[TMP4]], %struct.i128* [[TMP0]], align 4
1152
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast %struct.i128* [[TMP0]] to <4 x float>*
1153
+ ; CHECK-NEXT: store <4 x float> [[TMP4]], <4 x float>* [[TMP5]], align 16
1116
1154
; CHECK-NEXT: ret void
1117
1155
;
1118
1156
;
1119
- ; CHECK-LABEL: define {{[^@]+}}@bitcast_array_v4i32_v4f32
1157
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_array_v4i32_v4f32.body
1120
1158
; CHECK-SAME: ([4 x i32]* [[OUT:%.*]], [4 x float] [[VALUE:%.*]]) #[[ATTR0]] {
1121
1159
; CHECK-NEXT: [[CAST:%.*]] = bitcast [4 x i32]* [[OUT]] to [4 x float]*
1122
- ; CHECK-NEXT: store [4 x float] [[VALUE]], [4 x float]* [[CAST]], align 4
1160
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_ARRAY_V4I32_V4F32:%.*]] undef, [4 x float] [[VALUE]], 0
1161
+ ; CHECK-NEXT: ret [[BITCAST_ARRAY_V4I32_V4F32]] [[TMP1]]
1162
+ ;
1163
+ ;
1164
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_array_v4i32_v4f32
1165
+ ; CHECK-SAME: ([4 x i32]* [[TMP0:%.*]], [4 x float] [[TMP1:%.*]]) #[[ATTR2]] {
1166
+ ; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_ARRAY_V4I32_V4F32:%.*]] @bitcast_array_v4i32_v4f32.body([4 x i32]* undef, [4 x float] [[TMP1]])
1167
+ ; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_ARRAY_V4I32_V4F32]] [[TMP3]], 0
1168
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast [4 x i32]* [[TMP0]] to [4 x float]*
1169
+ ; CHECK-NEXT: store [4 x float] [[TMP4]], [4 x float]* [[TMP5]], align 4
1123
1170
; CHECK-NEXT: ret void
1124
1171
;
1125
1172
;
@@ -1130,30 +1177,36 @@ attributes #2 = { alwaysinline nounwind }
1130
1177
; CHECK: ret0:
1131
1178
; CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <3 x float> [[VALUE]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
1132
1179
; CHECK-NEXT: [[CAST0:%.*]] = bitcast %struct.v3f32* [[OUT]] to <4 x float>*
1133
- ; CHECK-NEXT: [[TMP0:%.*]] = shufflevector <4 x float> [[EXTRACTVEC]], <4 x float> poison, <3 x i32> <i32 0, i32 1, i32 2>
1134
- ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[STRUCT_V3F32:%.*]] undef, <3 x float> [[TMP0]], 0
1135
- ; CHECK-NEXT: [[TMP2:%.*]] = insertvalue [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32:%.*]] undef, [[STRUCT_V3F32]] [[TMP1]], 0
1136
- ; CHECK-NEXT: ret [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] [[TMP2]]
1180
+ ; CHECK-NEXT: [[TMP0:%.*]] = insertvalue [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32:%.*]] undef, <4 x float> [[EXTRACTVEC]], 0
1181
+ ; CHECK-NEXT: ret [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] [[TMP0]]
1137
1182
; CHECK: ret1:
1138
1183
; CHECK-NEXT: [[CAST1:%.*]] = bitcast %struct.v3f32* [[OUT]] to <4 x float>*
1139
1184
; CHECK-NEXT: [[LOAD:%.*]] = load <4 x float>, <4 x float> addrspace(1)* undef, align 16
1140
- ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[LOAD]], <4 x float> poison, <3 x i32> <i32 0, i32 1, i32 2>
1141
- ; CHECK-NEXT: [[TMP4:%.*]] = insertvalue [[STRUCT_V3F32]] undef, <3 x float> [[TMP3]], 0
1142
- ; CHECK-NEXT: [[TMP5:%.*]] = insertvalue [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] undef, [[STRUCT_V3F32]] [[TMP4]], 0
1143
- ; CHECK-NEXT: ret [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] [[TMP5]]
1185
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] undef, <4 x float> [[LOAD]], 0
1186
+ ; CHECK-NEXT: ret [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] [[TMP1]]
1144
1187
;
1145
1188
;
1146
1189
; CHECK-LABEL: define {{[^@]+}}@multi_return_bitcast_struct_v3f32_v3f32
1147
1190
; CHECK-SAME: (i1 [[TMP0:%.*]], %struct.v3f32* [[TMP1:%.*]], <3 x float> [[TMP2:%.*]]) #[[ATTR2]] {
1148
1191
; CHECK-NEXT: [[TMP4:%.*]] = call [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32:%.*]] @multi_return_bitcast_struct_v3f32_v3f32.body(i1 [[TMP0]], %struct.v3f32* undef, <3 x float> [[TMP2]])
1149
1192
; CHECK-NEXT: [[TMP5:%.*]] = extractvalue [[MULTI_RETURN_BITCAST_STRUCT_V3F32_V3F32]] [[TMP4]], 0
1150
- ; CHECK-NEXT: store [[STRUCT_V3F32:%.*]] [[TMP5]], %struct.v3f32* [[TMP1]], align 16
1193
+ ; CHECK-NEXT: [[TMP6:%.*]] = bitcast %struct.v3f32* [[TMP1]] to <4 x float>*
1194
+ ; CHECK-NEXT: store <4 x float> [[TMP5]], <4 x float>* [[TMP6]], align 16
1151
1195
; CHECK-NEXT: ret void
1152
1196
;
1153
1197
;
1154
- ; CHECK-LABEL: define {{[^@]+}}@bitcast_v3f32_struct_v3f32
1198
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_v3f32_struct_v3f32.body
1155
1199
; CHECK-SAME: (<3 x float>* [[OUT:%.*]], [[STRUCT_V3F32:%.*]] [[VALUE:%.*]]) #[[ATTR0]] {
1156
1200
; CHECK-NEXT: [[CAST:%.*]] = bitcast <3 x float>* [[OUT]] to %struct.v3f32*
1157
- ; CHECK-NEXT: store [[STRUCT_V3F32]] [[VALUE]], %struct.v3f32* [[CAST]], align 4
1201
+ ; CHECK-NEXT: [[TMP1:%.*]] = insertvalue [[BITCAST_V3F32_STRUCT_V3F32:%.*]] undef, [[STRUCT_V3F32]] [[VALUE]], 0
1202
+ ; CHECK-NEXT: ret [[BITCAST_V3F32_STRUCT_V3F32]] [[TMP1]]
1203
+ ;
1204
+ ;
1205
+ ; CHECK-LABEL: define {{[^@]+}}@bitcast_v3f32_struct_v3f32
1206
+ ; CHECK-SAME: (<3 x float>* [[TMP0:%.*]], [[STRUCT_V3F32:%.*]] [[TMP1:%.*]]) #[[ATTR2]] {
1207
+ ; CHECK-NEXT: [[TMP3:%.*]] = call [[BITCAST_V3F32_STRUCT_V3F32:%.*]] @bitcast_v3f32_struct_v3f32.body(<3 x float>* undef, [[STRUCT_V3F32]] [[TMP1]])
1208
+ ; CHECK-NEXT: [[TMP4:%.*]] = extractvalue [[BITCAST_V3F32_STRUCT_V3F32]] [[TMP3]], 0
1209
+ ; CHECK-NEXT: [[TMP5:%.*]] = bitcast <3 x float>* [[TMP0]] to %struct.v3f32*
1210
+ ; CHECK-NEXT: store [[STRUCT_V3F32]] [[TMP4]], %struct.v3f32* [[TMP5]], align 16
1158
1211
; CHECK-NEXT: ret void
1159
1212
;
0 commit comments