Index: lib/Target/ARM64/ARM64ISelLowering.cpp =================================================================== --- lib/Target/ARM64/ARM64ISelLowering.cpp +++ lib/Target/ARM64/ARM64ISelLowering.cpp @@ -5812,12 +5812,12 @@ // addressing mode). Just do two i64 store of zero-registers. bool Fast; const Function *F = MF.getFunction(); - if (!IsMemset && Size >= 16 && + if (Subtarget->hasFPARMv8() && !IsMemset && Size >= 16 && !F->getAttributes().hasAttribute(AttributeSet::FunctionIndex, Attribute::NoImplicitFloat) && (memOpAlign(SrcAlign, DstAlign, 16) || - (allowsUnalignedMemoryAccesses(MVT::v2i64, 0, &Fast) && Fast))) - return MVT::v2i64; + (allowsUnalignedMemoryAccesses(MVT::f128, 0, &Fast) && Fast))) + return MVT::f128; return Size >= 8 ? MVT::i64 : MVT::i32; } Index: test/CodeGen/AArch64/alloca.ll =================================================================== --- test/CodeGen/AArch64/alloca.ll +++ test/CodeGen/AArch64/alloca.ll @@ -1,6 +1,7 @@ ; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs < %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-AARCH64 ; RUN: llc -mtriple=arm64-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ARM64 -; RUN: llc -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK-NOFP %s +; RUN: llc -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK-NOFP-AARCH64 %s +; RUN: llc -mtriple=arm64-none-linux-gnu -mattr=-fp-armv8 -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK-NOFP-ARM64 %s declare void @use_addr(i8*) @@ -76,11 +77,11 @@ ; CHECK-AARCH64-FP: str q1, [x8, #16] -; CHECK-NOFP: sub sp, sp, #80 -; CHECK-NOFP: stp x29, x30, [sp, #64] -; CHECK-NOFP: add x29, sp, #64 -; CHECK-NOFP: sub [[TMP:x[0-9]+]], x29, #64 -; CHECK-NOFP: add x8, [[TMP]], #0 +; CHECK-NOFP-AARCH64: sub sp, sp, #80 +; CHECK-NOFP-AARCH64: stp x29, x30, [sp, #64] +; CHECK-NOFP-AARCH64: add x29, sp, #64 +; CHECK-NOFP-AARCH64: sub [[TMP:x[0-9]+]], x29, #64 +; CHECK-NOFP-AARCH64: add x8, [[TMP]], #0 ; CHECK-ARM64: stp x29, x30, [sp, #-16]! @@ -94,6 +95,16 @@ ; [...] ; CHECK-ARM64: stp x2, x3, [x29, #-48] +; CHECK-NOFP-ARM64: stp x29, x30, [sp, #-16]! +; CHECK-NOFP-ARM64: mov x29, sp +; CHECK-NOFP-ARM64: sub sp, sp, #64 +; CHECK-NOFP-ARM64: stp x6, x7, [x29, #-16] +; [...] +; CHECK-NOFP-ARM64: stp x4, x5, [x29, #-32] +; [...] +; CHECK-NOFP-ARM64: stp x2, x3, [x29, #-48] +; [...] +; CHECK-NOFP-ARM64: mov x8, sp %addr = alloca i8, i64 %n @@ -105,9 +116,12 @@ ; CHECK-AARCH64: ldp x29, x30, [sp, #192] ; CHECK-AARCH64: add sp, sp, #208 -; CHECK-NOFP: sub sp, x29, #64 -; CHECK-NOFP: ldp x29, x30, [sp, #64] -; CHECK-NOFP: add sp, sp, #80 +; CHECK-NOFP-AARCH64: sub sp, x29, #64 +; CHECK-NOFP-AARCH64: ldp x29, x30, [sp, #64] +; CHECK-NOFP-AARCH64: add sp, sp, #80 + +; CHECK-NOFP-ARM64: mov sp, x29 +; CHECK-NOFP-ARM64: ldp x29, x30, [sp], #16 } define void @test_alloca_large_frame(i64 %n) { Index: test/CodeGen/AArch64/cond-sel.ll =================================================================== --- test/CodeGen/AArch64/cond-sel.ll +++ test/CodeGen/AArch64/cond-sel.ll @@ -1,6 +1,7 @@ ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-AARCH64 ; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -mcpu=cyclone | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ARM64 ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s +; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s @var32 = global i32 0 @var64 = global i64 0 Index: test/CodeGen/AArch64/directcond.ll =================================================================== --- test/CodeGen/AArch64/directcond.ll +++ test/CodeGen/AArch64/directcond.ll @@ -1,6 +1,7 @@ ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-AARCH64 ; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-apple-ios7.0 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ARM64 ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s +; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s define i32 @test_select_i32(i1 %bit, i32 %a, i32 %b) { ; CHECK-LABEL: test_select_i32: Index: test/CodeGen/AArch64/func-argpassing.ll =================================================================== --- test/CodeGen/AArch64/func-argpassing.ll +++ test/CodeGen/AArch64/func-argpassing.ll @@ -3,6 +3,7 @@ ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64_be-none-linux-gnu | FileCheck --check-prefix=CHECK --check-prefix=CHECK-BE %s ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64_be-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s ; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu | FileCheck --check-prefix=CHECK --check-prefix=CHECK-ARM64 %s +; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s %myStruct = type { i64 , i8, i32 } Index: test/CodeGen/AArch64/func-calls.ll =================================================================== --- test/CodeGen/AArch64/func-calls.ll +++ test/CodeGen/AArch64/func-calls.ll @@ -3,6 +3,8 @@ ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64_be-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-BE --check-prefix=CHECK-NOFP %s ; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ARM64 +; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -mattr=-neon | FileCheck --check-prefix=CHECK --check-prefix=CHECK-ARM64-NONEON %s +; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s %myStruct = type { i64 , i8, i32 } @@ -98,6 +100,10 @@ ; CHECK-ARM64-DAG: fmov d[[FINAL_DOUBLE:[0-9]+]], #1.0 ; CHECK-ARM64: orr v0.16b, v[[FINAL_DOUBLE]].16b, v[[FINAL_DOUBLE]].16b +; CHECK-ARM64-NONEON-DAG: str {{q[0-9]+}}, [sp] +; CHECK-ARM64-NONEON-DAG: fmov d[[FINAL_DOUBLE:[0-9]+]], #1.0 +; CHECK-ARM64-NONEON: fmov d0, d[[FINAL_DOUBLE]] + ; CHECK: bl struct_on_stack ; CHECK-NOFP-NOT: fmov @@ -111,6 +117,9 @@ ; CHECK-ARM64: movz [[SIXTY_FOUR:w[0-9]+]], #17024, lsl #16 ; CHECK-ARM64: str [[SIXTY_FOUR]], [sp] +; CHECK-ARM64-NONEON: movz [[SIXTY_FOUR:w[0-9]+]], #17024, lsl #16 +; CHECK-ARM64-NONEON: str [[SIXTY_FOUR]], [sp] + ; CHECK: bl stacked_fpu ret void } @@ -135,6 +144,7 @@ ; CHECK-AARCH64: str [[I128HI]], [x[[SPREG]], #24] ; CHECK-AARCH64: str [[I128LO]], [x[[SPREG]], #16] ; CHECK-ARM64: stp [[I128LO]], [[I128HI]], [sp, #16] +; CHECK-ARM64-NONEON: stp [[I128LO]], [[I128HI]], [sp, #16] ; CHECK: bl check_i128_stackalign call void @check_i128_regalign(i32 0, i128 42) Index: test/CodeGen/AArch64/ldst-regoffset.ll =================================================================== --- test/CodeGen/AArch64/ldst-regoffset.ll +++ test/CodeGen/AArch64/ldst-regoffset.ll @@ -1,6 +1,7 @@ ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s ; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-none-linux-gnu | FileCheck %s +; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s @var_8bit = global i8 0 @var_16bit = global i16 0 Index: test/CodeGen/AArch64/ldst-unscaledimm.ll =================================================================== --- test/CodeGen/AArch64/ldst-unscaledimm.ll +++ test/CodeGen/AArch64/ldst-unscaledimm.ll @@ -1,6 +1,7 @@ ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s ; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-linux-gnu | FileCheck %s +; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s @var_8bit = global i8 0 @var_16bit = global i16 0 Index: test/CodeGen/AArch64/ldst-unsignedimm.ll =================================================================== --- test/CodeGen/AArch64/ldst-unsignedimm.ll +++ test/CodeGen/AArch64/ldst-unsignedimm.ll @@ -1,6 +1,7 @@ ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s ; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-none-linux-gnu | FileCheck %s +; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s @var_8bit = global i8 0 @var_16bit = global i16 0 Index: test/CodeGen/AArch64/literal_pools_float.ll =================================================================== --- test/CodeGen/AArch64/literal_pools_float.ll +++ test/CodeGen/AArch64/literal_pools_float.ll @@ -4,6 +4,8 @@ ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -code-model=large -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP-LARGE %s ; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-none-linux-gnu -mcpu=cyclone | FileCheck %s ; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-none-linux-gnu -code-model=large -mcpu=cyclone | FileCheck --check-prefix=CHECK-LARGE %s +; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s +; RUN: llc -verify-machineinstrs < %s -mtriple=arm64-none-linux-gnu -code-model=large -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP-LARGE %s @varfloat = global float 0.0 @vardouble = global double 0.0