[PATCH] D22267: [AArch64] Properly validate the reciprocal estimation

Evandro Menezes via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 11:49:34 PDT 2016


evandro updated this revision to Diff 64531.
evandro marked 2 inline comments as done.
evandro added a comment.

Add validation for the _Float16 types.


Repository:
  rL LLVM

https://reviews.llvm.org/D22267

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Index: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -4568,6 +4568,12 @@
     return SDValue();
 
   EVT VT = Operand.getValueType();
+  if (VT != MVT::f64 && VT != MVT::v1f64 && VT != MVT::v2f64 &&
+      VT != MVT::f32 && VT != MVT::v1f32 &&
+      VT != MVT::v2f32 && VT != MVT::v4f32 &&
+      (!ST.hasFullFP16() ||
+       (VT != MVT::f16 && VT != MVT::v4f16 && VT != MVT::v8f16)))
+    return SDValue();
 
   std::string RecipOp;
   RecipOp = Opcode == (AArch64ISD::FRECPE) ? "div": "sqrt";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22267.64531.patch
Type: text/x-patch
Size: 674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160719/ac752bd7/attachment.bin>


More information about the llvm-commits mailing list