Fix convertBFloatAPFloatToAPInt for NaN/Inf values
authorDiego Caballero <diego.caballero@intel.com>
Sat, 6 Jun 2020 00:06:42 +0000 (17:06 -0700)
committerDiego Caballero <diego.caballero@intel.com>
Sat, 6 Jun 2020 00:22:43 +0000 (17:22 -0700)
commita2588948febccfed5ba074fc32dcb093484fa5c8
tree2d89f03f46953a9bc7e3ef464d8e45da29c27a84
parentf39e12a06b6018db195848ca1f7bd01bf0240fac
Fix convertBFloatAPFloatToAPInt for NaN/Inf values

Bfloat type has an 8-bit exponent so the exponent of NaN/Inf numbers
must be 0xff instead of 0x1f. This is probably a copy-paste mistake
from the half float type.

Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D81302
llvm/lib/Support/APFloat.cpp
llvm/test/Assembler/bfloat.ll