Skip to content

Commit 97e0366

Browse files
committed
[AArch64] Add some fp16 conversion cost tests. NFC
1 parent 3f7c3ff commit 97e0366

File tree

1 file changed

+111
-1
lines changed
  • llvm/test/Analysis/CostModel/AArch64

1 file changed

+111
-1
lines changed

llvm/test/Analysis/CostModel/AArch64/cast.ll

Lines changed: 111 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,6 @@ define i32 @casts_no_users() {
536536
%r111 = fptosi <4 x float> undef to <4 x i1>
537537
%r112 = fptoui <4 x float> undef to <4 x i8>
538538
%r113 = fptosi <4 x float> undef to <4 x i8>
539-
540539
%r114 = fptoui <4 x float> undef to <4 x i16>
541540
%r115 = fptosi <4 x float> undef to <4 x i16>
542541
%r116 = fptoui <4 x float> undef to <4 x i32>
@@ -1022,4 +1021,115 @@ define void @extend_extract() {
10221021

10231022
declare void @use(i16, i16, i32, i32, i64, i64, i32, i32, i64, i64, i64, i64)
10241023

1024+
define void @fp16cast() {
1025+
; CHECK-LABEL: 'fp16cast'
1026+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r30 = fptoui half undef to i1
1027+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r31 = fptosi half undef to i1
1028+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r32 = fptoui half undef to i8
1029+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r33 = fptosi half undef to i8
1030+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r34 = fptoui half undef to i16
1031+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r35 = fptosi half undef to i16
1032+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r36 = fptoui half undef to i32
1033+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r37 = fptosi half undef to i32
1034+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r38 = fptoui half undef to i64
1035+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r39 = fptosi half undef to i64
1036+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r90 = fptoui <2 x half> undef to <2 x i1>
1037+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r91 = fptosi <2 x half> undef to <2 x i1>
1038+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r92 = fptoui <2 x half> undef to <2 x i8>
1039+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r93 = fptosi <2 x half> undef to <2 x i8>
1040+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r94 = fptoui <2 x half> undef to <2 x i16>
1041+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r95 = fptosi <2 x half> undef to <2 x i16>
1042+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r96 = fptoui <2 x half> undef to <2 x i32>
1043+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r97 = fptosi <2 x half> undef to <2 x i32>
1044+
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r98 = fptoui <2 x half> undef to <2 x i64>
1045+
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r99 = fptosi <2 x half> undef to <2 x i64>
1046+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r110 = fptoui <4 x half> undef to <4 x i1>
1047+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r111 = fptosi <4 x half> undef to <4 x i1>
1048+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r112 = fptoui <4 x half> undef to <4 x i8>
1049+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r113 = fptosi <4 x half> undef to <4 x i8>
1050+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r114 = fptoui <4 x half> undef to <4 x i16>
1051+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r115 = fptosi <4 x half> undef to <4 x i16>
1052+
; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %r116 = fptoui <4 x half> undef to <4 x i32>
1053+
; CHECK-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %r117 = fptosi <4 x half> undef to <4 x i32>
1054+
; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %r118 = fptoui <4 x half> undef to <4 x i64>
1055+
; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %r119 = fptosi <4 x half> undef to <4 x i64>
1056+
; CHECK-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %r130 = fptoui <8 x half> undef to <8 x i1>
1057+
; CHECK-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %r131 = fptosi <8 x half> undef to <8 x i1>
1058+
; CHECK-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %r132 = fptoui <8 x half> undef to <8 x i8>
1059+
; CHECK-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %r133 = fptosi <8 x half> undef to <8 x i8>
1060+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r134 = fptoui <8 x half> undef to <8 x i16>
1061+
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r135 = fptosi <8 x half> undef to <8 x i16>
1062+
; CHECK-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %r136 = fptoui <8 x half> undef to <8 x i32>
1063+
; CHECK-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %r137 = fptosi <8 x half> undef to <8 x i32>
1064+
; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %r138 = fptoui <8 x half> undef to <8 x i64>
1065+
; CHECK-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %r139 = fptosi <8 x half> undef to <8 x i64>
1066+
; CHECK-NEXT: Cost Model: Found an estimated cost of 101 for instruction: %r150 = fptoui <16 x half> undef to <16 x i1>
1067+
; CHECK-NEXT: Cost Model: Found an estimated cost of 101 for instruction: %r151 = fptosi <16 x half> undef to <16 x i1>
1068+
; CHECK-NEXT: Cost Model: Found an estimated cost of 101 for instruction: %r152 = fptoui <16 x half> undef to <16 x i8>
1069+
; CHECK-NEXT: Cost Model: Found an estimated cost of 101 for instruction: %r153 = fptosi <16 x half> undef to <16 x i8>
1070+
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r154 = fptoui <16 x half> undef to <16 x i16>
1071+
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r155 = fptosi <16 x half> undef to <16 x i16>
1072+
; CHECK-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %r156 = fptoui <16 x half> undef to <16 x i32>
1073+
; CHECK-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %r157 = fptosi <16 x half> undef to <16 x i32>
1074+
; CHECK-NEXT: Cost Model: Found an estimated cost of 70 for instruction: %r158 = fptoui <16 x half> undef to <16 x i64>
1075+
; CHECK-NEXT: Cost Model: Found an estimated cost of 70 for instruction: %r159 = fptosi <16 x half> undef to <16 x i64>
1076+
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
1077+
;
1078+
%r30 = fptoui half undef to i1
1079+
%r31 = fptosi half undef to i1
1080+
%r32 = fptoui half undef to i8
1081+
%r33 = fptosi half undef to i8
1082+
%r34 = fptoui half undef to i16
1083+
%r35 = fptosi half undef to i16
1084+
%r36 = fptoui half undef to i32
1085+
%r37 = fptosi half undef to i32
1086+
%r38 = fptoui half undef to i64
1087+
%r39 = fptosi half undef to i64
1088+
1089+
%r90 = fptoui <2 x half> undef to <2 x i1>
1090+
%r91 = fptosi <2 x half> undef to <2 x i1>
1091+
%r92 = fptoui <2 x half> undef to <2 x i8>
1092+
%r93 = fptosi <2 x half> undef to <2 x i8>
1093+
%r94 = fptoui <2 x half> undef to <2 x i16>
1094+
%r95 = fptosi <2 x half> undef to <2 x i16>
1095+
%r96 = fptoui <2 x half> undef to <2 x i32>
1096+
%r97 = fptosi <2 x half> undef to <2 x i32>
1097+
%r98 = fptoui <2 x half> undef to <2 x i64>
1098+
%r99 = fptosi <2 x half> undef to <2 x i64>
1099+
1100+
%r110 = fptoui <4 x half> undef to <4 x i1>
1101+
%r111 = fptosi <4 x half> undef to <4 x i1>
1102+
%r112 = fptoui <4 x half> undef to <4 x i8>
1103+
%r113 = fptosi <4 x half> undef to <4 x i8>
1104+
%r114 = fptoui <4 x half> undef to <4 x i16>
1105+
%r115 = fptosi <4 x half> undef to <4 x i16>
1106+
%r116 = fptoui <4 x half> undef to <4 x i32>
1107+
%r117 = fptosi <4 x half> undef to <4 x i32>
1108+
%r118 = fptoui <4 x half> undef to <4 x i64>
1109+
%r119 = fptosi <4 x half> undef to <4 x i64>
1110+
1111+
%r130 = fptoui <8 x half> undef to <8 x i1>
1112+
%r131 = fptosi <8 x half> undef to <8 x i1>
1113+
%r132 = fptoui <8 x half> undef to <8 x i8>
1114+
%r133 = fptosi <8 x half> undef to <8 x i8>
1115+
%r134 = fptoui <8 x half> undef to <8 x i16>
1116+
%r135 = fptosi <8 x half> undef to <8 x i16>
1117+
%r136 = fptoui <8 x half> undef to <8 x i32>
1118+
%r137 = fptosi <8 x half> undef to <8 x i32>
1119+
%r138 = fptoui <8 x half> undef to <8 x i64>
1120+
%r139 = fptosi <8 x half> undef to <8 x i64>
1121+
1122+
%r150 = fptoui <16 x half> undef to <16 x i1>
1123+
%r151 = fptosi <16 x half> undef to <16 x i1>
1124+
%r152 = fptoui <16 x half> undef to <16 x i8>
1125+
%r153 = fptosi <16 x half> undef to <16 x i8>
1126+
%r154 = fptoui <16 x half> undef to <16 x i16>
1127+
%r155 = fptosi <16 x half> undef to <16 x i16>
1128+
%r156 = fptoui <16 x half> undef to <16 x i32>
1129+
%r157 = fptosi <16 x half> undef to <16 x i32>
1130+
%r158 = fptoui <16 x half> undef to <16 x i64>
1131+
%r159 = fptosi <16 x half> undef to <16 x i64>
1132+
ret void
1133+
}
1134+
10251135
attributes #0 = { "target-features"="+sve" }

0 commit comments

Comments
 (0)