[all-commits] [llvm/llvm-project] 61a89e: [LegalizeDAG][Mips] Add an assert to protect a uin...
topperc via All-commits
all-commits at lists.llvm.org
Thu Jan 16 11:08:42 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 61a89e17df4c3baf9cdf317d8ae3a73788f2aa92
https://github.com/llvm/llvm-project/commit/61a89e17df4c3baf9cdf317d8ae3a73788f2aa92
Author: Craig Topper <craig.topper at intel.com>
Date: 2020-01-16 (Thu, 16 Jan 2020)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
M llvm/test/CodeGen/Mips/uitofp.ll
Log Message:
-----------
[LegalizeDAG][Mips] Add an assert to protect a uint_to_fp implementation from double rounding. Add a i32->f32 uint_to_fp implementation that avoids this code.
The algorithm here only works if the sint_to_fp doesn't do any
rounding. Otherwise it can round before the offset fixup is
applied. Add an assert to protect this.
To avoid breaking the one test in tree that tested this code
with a set of types that fail the assert, I've enabled i32->f32
to use the i64->f32 algorithm. This only occurs when f64 isn't
a legal type. If f64 is legal then we do i32->f64->f32 instead.
Differential Revision: https://reviews.llvm.org/D72794
More information about the All-commits
mailing list