[PATCH] [ConstantFolding] Fix wrong folding of intrinsic 'convert.from.fp16'.

Ahmed Bougacha ahmed.bougacha at gmail.com
Thu May 14 09:16:12 PDT 2015


================
Comment at: lib/Analysis/ConstantFolding.cpp:1403
@@ +1402,3 @@
+// constant folding intrinsic calls to 'convert_from_fp16'.
+static const fltSemantics &getFloatingPointSemanticFromType(const Type *Ty) {
+  if (Ty->isHalfTy())
----------------
ab wrote:
> I swear I saw the same construct elsewhere, but I can't find it.  Is there a good header where this could go?
Ah, there's Type::getFltSemantics, please use that instead of re-defining it.

http://reviews.llvm.org/D9771

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list