diff --git a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp --- a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp +++ b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp @@ -918,13 +918,13 @@ switch (I->getOpcode()) { case Instruction::FNeg: - return B.CreateFNeg(InputA); + return B.CreateFNegFMF(InputA, I); case Instruction::FAdd: - return B.CreateFAdd(InputA, InputB); + return B.CreateFAddFMF(InputA, InputB, I); case Instruction::FSub: - return B.CreateFSub(InputA, InputB); + return B.CreateFSubFMF(InputA, InputB, I); case Instruction::FMul: - return B.CreateFMul(InputA, InputB); + return B.CreateFMulFMF(InputA, InputB, I); } return nullptr; diff --git a/llvm/test/CodeGen/AArch64/complex-deinterleaving-mixed-cases.ll b/llvm/test/CodeGen/AArch64/complex-deinterleaving-mixed-cases.ll --- a/llvm/test/CodeGen/AArch64/complex-deinterleaving-mixed-cases.ll +++ b/llvm/test/CodeGen/AArch64/complex-deinterleaving-mixed-cases.ll @@ -358,10 +358,9 @@ define <4 x float> @mul_addequal(<4 x float> %a, <4 x float> %b, <4 x float> %c) { ; CHECK-LABEL: mul_addequal: ; CHECK: // %bb.0: // %entry -; CHECK-NEXT: movi v3.2d, #0000000000000000 -; CHECK-NEXT: fcmla v3.4s, v0.4s, v1.4s, #0 -; CHECK-NEXT: fcmla v3.4s, v0.4s, v1.4s, #90 -; CHECK-NEXT: fadd v0.4s, v3.4s, v2.4s +; CHECK-NEXT: fcmla v2.4s, v0.4s, v1.4s, #0 +; CHECK-NEXT: fcmla v2.4s, v0.4s, v1.4s, #90 +; CHECK-NEXT: mov v0.16b, v2.16b ; CHECK-NEXT: ret entry: %strided.vec = shufflevector <4 x float> %a, <4 x float> poison, <2 x i32>