You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> [[TMP1]], i64 0)
653
+
; CHECK-NEXT: ret <vscale x 4 x float> [[CAST_SCALABLE]]
654
+
;
655
+
entry:
656
+
%retval = alloca { <16 x float> }
657
+
%0 = fadd <vscale x 4 x float> %.coerce, %.coerce
658
+
store <vscale x 4 x float> %0, ptr%retval
659
+
%1 = load <16 x float>, ptr%retval
660
+
%cast.scalable = tailcall <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> %1, i640)
661
+
ret <vscale x 4 x float> %cast.scalable
662
+
}
663
+
664
+
; Here, only the lower bound for the vscale is known, but this is enough to allow a forward to a load to 16 elements.
665
+
define <vscale x 4 x float> @scalable_store_to_fixed_load_only_lower_bound(<vscale x 4 x float> %a) vscale_range(4) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> [[TMP0]], i64 0)
672
+
; CHECK-NEXT: ret <vscale x 4 x float> [[CAST_SCALABLE]]
673
+
;
674
+
entry:
675
+
%retval = alloca { <vscale x 4 x float> }
676
+
store <vscale x 4 x float> %a, ptr%retval
677
+
%1 = load <16 x float>, ptr%retval
678
+
%cast.scalable = tailcall <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> %1, i640)
679
+
ret <vscale x 4 x float> %cast.scalable
680
+
}
681
+
682
+
define <vscale x 4 x float> @scalable_store_to_fixed_load_with_offset(<vscale x 4 x float> %a) vscale_range(4,4) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> [[TMP0]], i64 0)
690
+
; CHECK-NEXT: ret <vscale x 4 x float> [[CAST_SCALABLE]]
691
+
;
692
+
entry:
693
+
%ptr = alloca { <32 x float> }
694
+
store <vscale x 4 x float> %a, ptr%ptr
695
+
%gep = getelementptrinboundsi8, ptr%ptr, i648
696
+
%1 = load <16 x float>, ptr%gep
697
+
%cast.scalable = tailcall <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> %1, i640)
698
+
ret <vscale x 4 x float> %cast.scalable
699
+
}
700
+
701
+
define <vscale x 4 x float> @scalable_store_to_fixed_load_unknown_vscale(<vscale x 4 x float> %.coerce) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> [[TMP1]], i64 0)
709
+
; CHECK-NEXT: ret <vscale x 4 x float> [[CAST_SCALABLE]]
710
+
;
711
+
entry:
712
+
%retval = alloca { <16 x float> }
713
+
%0 = fadd <vscale x 4 x float> %.coerce, %.coerce
714
+
store <vscale x 4 x float> %0, ptr%retval
715
+
%1 = load <16 x float>, ptr%retval
716
+
%cast.scalable = tailcall <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> %1, i640)
717
+
ret <vscale x 4 x float> %cast.scalable
718
+
}
719
+
720
+
define <vscale x 4 x float> @scalable_store_to_fixed_load_size_missmatch(<vscale x 4 x float> %.coerce) vscale_range(4,4) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v32f32(<vscale x 4 x float> poison, <32 x float> [[TMP1]], i64 0)
728
+
; CHECK-NEXT: ret <vscale x 4 x float> [[CAST_SCALABLE]]
729
+
;
730
+
entry:
731
+
%retval = alloca { <32 x float> }
732
+
%0 = fadd <vscale x 4 x float> %.coerce, %.coerce
733
+
store <vscale x 4 x float> %0, ptr%retval
734
+
%1 = load <32 x float>, ptr%retval
735
+
%cast.scalable = tailcall <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v32f32(<vscale x 4 x float> poison, <32 x float> %1, i640)
736
+
ret <vscale x 4 x float> %cast.scalable
737
+
}
738
+
739
+
define <vscale x 4 x i32> @scalable_store_to_fixed_load_different_types(<vscale x 4 x float> %a) vscale_range(4,4) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> poison, <16 x i32> [[TMP0]], i64 0)
746
+
; CHECK-NEXT: ret <vscale x 4 x i32> [[CAST_SCALABLE]]
747
+
;
748
+
entry:
749
+
%ptr = alloca { <16 x float> }
750
+
store <vscale x 4 x float> %a, ptr%ptr
751
+
%1 = load <16 x i32>, ptr%ptr
752
+
%cast.scalable = tailcall <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> poison, <16 x i32> %1, i640)
753
+
ret <vscale x 4 x i32> %cast.scalable
754
+
}
755
+
756
+
; This function does not have a fixed vscale, but the loaded vector is still known
757
+
; to be smaller or equal in size compared to the stored vector.
758
+
define <4 x float> @scalable_store_to_small_fixed_load(<vscale x 4 x float> %a) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> [[TMP1]], i64 0)
658
+
; CHECK-NEXT: ret <vscale x 4 x float> [[CAST_SCALABLE]]
659
+
;
660
+
entry:
661
+
%retval = alloca { <16 x float> }
662
+
%0 = fadd <vscale x 4 x float> %.coerce, %.coerce
663
+
store <vscale x 4 x float> %0, ptr%retval
664
+
%1 = load <16 x float>, ptr%retval
665
+
%cast.scalable = tailcall <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> %1, i640)
666
+
ret <vscale x 4 x float> %cast.scalable
667
+
}
668
+
669
+
; Here, only the lower bound for the vscale is known, but this is enough to allow a forward to a load to 16 elements.
670
+
define <vscale x 4 x float> @scalable_store_to_fixed_load_only_lower_bound(<vscale x 4 x float> %a) vscale_range(4) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> [[TMP0]], i64 0)
677
+
; CHECK-NEXT: ret <vscale x 4 x float> [[CAST_SCALABLE]]
678
+
;
679
+
entry:
680
+
%retval = alloca { <vscale x 4 x float> }
681
+
store <vscale x 4 x float> %a, ptr%retval
682
+
%1 = load <16 x float>, ptr%retval
683
+
%cast.scalable = tailcall <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> %1, i640)
684
+
ret <vscale x 4 x float> %cast.scalable
685
+
}
686
+
687
+
define <vscale x 4 x float> @scalable_store_to_fixed_load_with_offset(<vscale x 4 x float> %a) vscale_range(4,4) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> [[TMP0]], i64 0)
695
+
; CHECK-NEXT: ret <vscale x 4 x float> [[CAST_SCALABLE]]
696
+
;
697
+
entry:
698
+
%ptr = alloca { <32 x float> }
699
+
store <vscale x 4 x float> %a, ptr%ptr
700
+
%gep = getelementptrinboundsi8, ptr%ptr, i648
701
+
%1 = load <16 x float>, ptr%gep
702
+
%cast.scalable = tailcall <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> %1, i640)
703
+
ret <vscale x 4 x float> %cast.scalable
704
+
}
705
+
706
+
define <vscale x 4 x float> @scalable_store_to_fixed_load_unknown_vscale(<vscale x 4 x float> %.coerce) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> [[TMP1]], i64 0)
714
+
; CHECK-NEXT: ret <vscale x 4 x float> [[CAST_SCALABLE]]
715
+
;
716
+
entry:
717
+
%retval = alloca { <16 x float> }
718
+
%0 = fadd <vscale x 4 x float> %.coerce, %.coerce
719
+
store <vscale x 4 x float> %0, ptr%retval
720
+
%1 = load <16 x float>, ptr%retval
721
+
%cast.scalable = tailcall <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v16f32(<vscale x 4 x float> poison, <16 x float> %1, i640)
722
+
ret <vscale x 4 x float> %cast.scalable
723
+
}
724
+
725
+
define <vscale x 4 x float> @scalable_store_to_fixed_load_size_missmatch(<vscale x 4 x float> %.coerce) vscale_range(4,4) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v32f32(<vscale x 4 x float> poison, <32 x float> [[TMP1]], i64 0)
733
+
; CHECK-NEXT: ret <vscale x 4 x float> [[CAST_SCALABLE]]
734
+
;
735
+
entry:
736
+
%retval = alloca { <32 x float> }
737
+
%0 = fadd <vscale x 4 x float> %.coerce, %.coerce
738
+
store <vscale x 4 x float> %0, ptr%retval
739
+
%1 = load <32 x float>, ptr%retval
740
+
%cast.scalable = tailcall <vscale x 4 x float> @llvm.vector.insert.nxv4f32.v32f32(<vscale x 4 x float> poison, <32 x float> %1, i640)
741
+
ret <vscale x 4 x float> %cast.scalable
742
+
}
743
+
744
+
define <vscale x 4 x i32> @scalable_store_to_fixed_load_different_types(<vscale x 4 x float> %a) vscale_range(4,4) {
; CHECK-NEXT: [[CAST_SCALABLE:%.*]] = tail call <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> poison, <16 x i32> [[TMP0]], i64 0)
751
+
; CHECK-NEXT: ret <vscale x 4 x i32> [[CAST_SCALABLE]]
752
+
;
753
+
entry:
754
+
%ptr = alloca { <16 x float> }
755
+
store <vscale x 4 x float> %a, ptr%ptr
756
+
%1 = load <16 x i32>, ptr%ptr
757
+
%cast.scalable = tailcall <vscale x 4 x i32> @llvm.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> poison, <16 x i32> %1, i640)
758
+
ret <vscale x 4 x i32> %cast.scalable
759
+
}
760
+
761
+
; This function does not have a fixed vscale, but the loaded vector is still known
762
+
; to be smaller or equal in size compared to the stored vector.
763
+
define <4 x float> @scalable_store_to_small_fixed_load(<vscale x 4 x float> %a) {
0 commit comments