Since the NvCast is generated by the selection process the concerns about
endianess and bit reversal don't apply.
rdar://
21703486
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241611
91177308-0d34-0410-b5e6-
96231b3b80d8
def : Pat<(v4i32 (AArch64NvCast (v2f64 FPR128:$src))), (v4i32 FPR128:$src)>;
def : Pat<(v2i64 (AArch64NvCast (v2f64 FPR128:$src))), (v2i64 FPR128:$src)>;
def : Pat<(v2f64 (AArch64NvCast (v2f64 FPR128:$src))), (v2f64 FPR128:$src)>;
+def : Pat<(v4f32 (AArch64NvCast (v2f64 FPR128:$src))), (v4f32 FPR128:$src)>;
let Predicates = [IsLE] in {
def : Pat<(v8i8 (bitconvert GPR64:$Xn)), (COPY_TO_REGCLASS GPR64:$Xn, FPR64)>;
--- /dev/null
+; RUN: llc < %s -mtriple=arm64-apple-ios
+
+define void @test(float * %p1, i32 %v1) {
+entry:
+ %v2 = extractelement <3 x float> <float 0.000000e+00, float 2.000000e+00, float 0.000000e+00>, i32 %v1
+ store float %v2, float* %p1, align 4
+ ret void
+}