Index: llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td =================================================================== --- llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td +++ llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td @@ -6203,6 +6203,7 @@ def : Pat<(v2i32 (AArch64NvCast (v2f32 FPR64:$src))), (v2i32 FPR64:$src)>; def : Pat<(v2f32 (AArch64NvCast (v2f32 FPR64:$src))), (v2f32 FPR64:$src)>; def : Pat<(v1i64 (AArch64NvCast (v2f32 FPR64:$src))), (v1i64 FPR64:$src)>; +def : Pat<(v1f64 (AArch64NvCast (v2f32 FPR64:$src))), (v1f64 FPR64:$src)>; // Natural vector casts (128 bit) def : Pat<(v16i8 (AArch64NvCast (v4i32 FPR128:$src))), (v16i8 FPR128:$src)>; Index: llvm/trunk/test/CodeGen/AArch64/arm64-nvcast.ll =================================================================== --- llvm/trunk/test/CodeGen/AArch64/arm64-nvcast.ll +++ llvm/trunk/test/CodeGen/AArch64/arm64-nvcast.ll @@ -47,3 +47,15 @@ store <2 x float> , <2 x float>* bitcast (%"st1"* @_gv to <2 x float>*), align 8 ret void } + +%struct.Vector3 = type { float, float, float } + +define void @nvcast_v2f32_v1f64(%struct.Vector3*) { +; CHECK-LABEL: _nvcast_v2f32_v1f64 +; CHECK: fmov.2s v[[REG:[0-9]+]], #1.00000000 +; CHECK: str d[[REG]], [x0] +entry: + %a13 = bitcast %struct.Vector3* %0 to <1 x double>* + store <1 x double> , <1 x double>* %a13, align 8 + ret void +}