Skip to content

Commit fd331ef

Browse files
authored
[CostModel][X86] Track fpext conversion cost for 16 elements (#76277)
1 parent a041da3 commit fd331ef

File tree

1 file changed

+12
-8
lines changed
  • llvm/test/Analysis/CostModel/X86

1 file changed

+12
-8
lines changed

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -616,27 +616,31 @@ define void @fp_conv(<8 x float> %a, <16 x float>%b, <4 x float> %c) {
616616
; SSE-LABEL: 'fp_conv'
617617
; SSE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %A1 = fpext <4 x float> %c to <4 x double>
618618
; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %A2 = fpext <8 x float> %a to <8 x double>
619-
; SSE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %A3 = fptrunc <4 x double> undef to <4 x float>
620-
; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %A4 = fptrunc <8 x double> undef to <8 x float>
619+
; SSE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %A3 = fpext <16 x float> %b to <16 x double>
620+
; SSE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %A4 = fptrunc <4 x double> undef to <4 x float>
621+
; SSE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %A5 = fptrunc <8 x double> undef to <8 x float>
621622
; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
622623
;
623624
; AVX-LABEL: 'fp_conv'
624625
; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A1 = fpext <4 x float> %c to <4 x double>
625626
; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %A2 = fpext <8 x float> %a to <8 x double>
626-
; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A3 = fptrunc <4 x double> undef to <4 x float>
627-
; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %A4 = fptrunc <8 x double> undef to <8 x float>
627+
; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %A3 = fpext <16 x float> %b to <16 x double>
628+
; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A4 = fptrunc <4 x double> undef to <4 x float>
629+
; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %A5 = fptrunc <8 x double> undef to <8 x float>
628630
; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
629631
;
630632
; AVX512-LABEL: 'fp_conv'
631633
; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A1 = fpext <4 x float> %c to <4 x double>
632634
; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A2 = fpext <8 x float> %a to <8 x double>
633-
; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A3 = fptrunc <4 x double> undef to <4 x float>
634-
; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A4 = fptrunc <8 x double> undef to <8 x float>
635+
; AVX512-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %A3 = fpext <16 x float> %b to <16 x double>
636+
; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A4 = fptrunc <4 x double> undef to <4 x float>
637+
; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A5 = fptrunc <8 x double> undef to <8 x float>
635638
; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
636639
;
637640
%A1 = fpext <4 x float> %c to <4 x double>
638641
%A2 = fpext <8 x float> %a to <8 x double>
639-
%A3 = fptrunc <4 x double> undef to <4 x float>
640-
%A4 = fptrunc <8 x double> undef to <8 x float>
642+
%A3 = fpext <16 x float> %b to <16 x double>
643+
%A4 = fptrunc <4 x double> undef to <4 x float>
644+
%A5 = fptrunc <8 x double> undef to <8 x float>
641645
ret void
642646
}

0 commit comments

Comments
 (0)