[llvm] r289372 - [X86][InstCombine] Teach InstCombineCalls to simplify demanded elements for scalar FMA intrinsics.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 10 23:42:06 PST 2016


Author: ctopper
Date: Sun Dec 11 01:42:06 2016
New Revision: 289372

URL: http://llvm.org/viewvc/llvm-project?rev=289372&view=rev
Log:
[X86][InstCombine] Teach InstCombineCalls to simplify demanded elements for scalar FMA intrinsics.

These intrinsics don't read the upper bits of their second and third inputs so we can try to simplify them.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=289372&r1=289371&r2=289372&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Sun Dec 11 01:42:06 2016
@@ -1777,6 +1777,14 @@ Instruction *InstCombiner::visitCallInst
     break;
   }
 
+  case Intrinsic::x86_fma_vfmadd_ss:
+  case Intrinsic::x86_fma_vfmsub_ss:
+  case Intrinsic::x86_fma_vfnmadd_ss:
+  case Intrinsic::x86_fma_vfnmsub_ss:
+  case Intrinsic::x86_fma_vfmadd_sd:
+  case Intrinsic::x86_fma_vfmsub_sd:
+  case Intrinsic::x86_fma_vfnmadd_sd:
+  case Intrinsic::x86_fma_vfnmsub_sd:
   case Intrinsic::x86_avx512_mask_add_ss_round:
   case Intrinsic::x86_avx512_mask_div_ss_round:
   case Intrinsic::x86_avx512_mask_mul_ss_round:




More information about the llvm-commits mailing list