mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-07 11:33:44 +00:00
[ARM] Also support v2f64 vld1/vst1.
It was missing from the VLD1/VST1 handling logic, even though the corresponding instructions exist (same form as v2i64). In preparation for a future patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
90cd6f1113
commit
a31421e2dc
@ -1784,6 +1784,7 @@ SDNode *ARMDAGToDAGISel::SelectVLD(SDNode *N, bool isUpdating, unsigned NumVecs,
|
||||
case MVT::v8i16: OpcodeIndex = 1; break;
|
||||
case MVT::v4f32:
|
||||
case MVT::v4i32: OpcodeIndex = 2; break;
|
||||
case MVT::v2f64:
|
||||
case MVT::v2i64: OpcodeIndex = 3;
|
||||
assert(NumVecs == 1 && "v2i64 type only supported for VLD1");
|
||||
break;
|
||||
@ -1920,6 +1921,7 @@ SDNode *ARMDAGToDAGISel::SelectVST(SDNode *N, bool isUpdating, unsigned NumVecs,
|
||||
case MVT::v8i16: OpcodeIndex = 1; break;
|
||||
case MVT::v4f32:
|
||||
case MVT::v4i32: OpcodeIndex = 2; break;
|
||||
case MVT::v2f64:
|
||||
case MVT::v2i64: OpcodeIndex = 3;
|
||||
assert(NumVecs == 1 && "v2i64 type only supported for VST1");
|
||||
break;
|
||||
|
@ -119,6 +119,14 @@ define <2 x i64> @vld1Qi64(i64* %A) nounwind {
|
||||
ret <2 x i64> %tmp1
|
||||
}
|
||||
|
||||
define <2 x double> @vld1Qf64(double* %A) nounwind {
|
||||
;CHECK-LABEL: vld1Qf64:
|
||||
;CHECK: vld1.64
|
||||
%tmp0 = bitcast double* %A to i8*
|
||||
%tmp1 = call <2 x double> @llvm.arm.neon.vld1.v2f64(i8* %tmp0, i32 1)
|
||||
ret <2 x double> %tmp1
|
||||
}
|
||||
|
||||
declare <8 x i8> @llvm.arm.neon.vld1.v8i8(i8*, i32) nounwind readonly
|
||||
declare <4 x i16> @llvm.arm.neon.vld1.v4i16(i8*, i32) nounwind readonly
|
||||
declare <2 x i32> @llvm.arm.neon.vld1.v2i32(i8*, i32) nounwind readonly
|
||||
@ -130,6 +138,7 @@ declare <8 x i16> @llvm.arm.neon.vld1.v8i16(i8*, i32) nounwind readonly
|
||||
declare <4 x i32> @llvm.arm.neon.vld1.v4i32(i8*, i32) nounwind readonly
|
||||
declare <4 x float> @llvm.arm.neon.vld1.v4f32(i8*, i32) nounwind readonly
|
||||
declare <2 x i64> @llvm.arm.neon.vld1.v2i64(i8*, i32) nounwind readonly
|
||||
declare <2 x double> @llvm.arm.neon.vld1.v2f64(i8*, i32) nounwind readonly
|
||||
|
||||
; Radar 8355607
|
||||
; Do not crash if the vld1 result is not used.
|
||||
|
@ -117,6 +117,15 @@ define void @vst1Qi64(i64* %A, <2 x i64>* %B) nounwind {
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @vst1Qf64(double* %A, <2 x double>* %B) nounwind {
|
||||
;CHECK-LABEL: vst1Qf64:
|
||||
;CHECK: vst1.64
|
||||
%tmp0 = bitcast double* %A to i8*
|
||||
%tmp1 = load <2 x double>* %B
|
||||
call void @llvm.arm.neon.vst1.v2f64(i8* %tmp0, <2 x double> %tmp1, i32 1)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @llvm.arm.neon.vst1.v8i8(i8*, <8 x i8>, i32) nounwind
|
||||
declare void @llvm.arm.neon.vst1.v4i16(i8*, <4 x i16>, i32) nounwind
|
||||
declare void @llvm.arm.neon.vst1.v2i32(i8*, <2 x i32>, i32) nounwind
|
||||
@ -128,3 +137,4 @@ declare void @llvm.arm.neon.vst1.v8i16(i8*, <8 x i16>, i32) nounwind
|
||||
declare void @llvm.arm.neon.vst1.v4i32(i8*, <4 x i32>, i32) nounwind
|
||||
declare void @llvm.arm.neon.vst1.v4f32(i8*, <4 x float>, i32) nounwind
|
||||
declare void @llvm.arm.neon.vst1.v2i64(i8*, <2 x i64>, i32) nounwind
|
||||
declare void @llvm.arm.neon.vst1.v2f64(i8*, <2 x double>, i32) nounwind
|
||||
|
Loading…
Reference in New Issue
Block a user