[PATCH] D48467: [X86] Recognize an fnma in the presence of an intervening shuffle.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 22 09:38:18 PDT 2018


spatel added a comment.

Does this patch deal with the case if we negate the scalar before doing the splat?

define <8 x float> @test7(float %a, <8 x float> %b, <8 x float> %c)  {

  %t0 = fsub float -0.0, %a
  %t1 = insertelement <8 x float> undef, float %t0, i32 0
  %t2 = shufflevector <8 x float> %t1, <8 x float> undef, <8 x i32> zeroinitializer
  %t3 = tail call <8 x float> @llvm.fma.v8f32(<8 x float> %t2, <8 x float> %b, <8 x float> %c)
  ret <8 x float> %t3

}

That transform was suggested as a canonicalization in:
https://bugs.llvm.org/show_bug.cgi?id=37463


Repository:
  rL LLVM

https://reviews.llvm.org/D48467





More information about the llvm-commits mailing list