OSDN Git Service

[CodeGen] Mark the promoted FCOPYSIGN result FP_ROUND as TRUNCating.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 13 Aug 2015 01:32:30 +0000 (01:32 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 13 Aug 2015 01:32:30 +0000 (01:32 +0000)
commit5689f67ef75ea0b927e0bb3c3cda9078e9bf100f
tree4ae5edce269672e99d785af2f10fea9bcd226c09
parentc5b90eb2847dcd001716c479be79d4fc8e6b56c9
[CodeGen] Mark the promoted FCOPYSIGN result FP_ROUND as TRUNCating.

Now that we can properly promote mismatched FCOPYSIGNs (r244858), we
can mark the FP_ROUND on the result as truncating, to expose folding.

FCOPYSIGN doesn't change anything but the sign bit, so
  (fp_round (fcopysign (fpext a), b))
is equivalent to (modulo the sign bit):
  (fp_round (fpext a))
which is a no-op.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244862 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
test/CodeGen/AArch64/f16-instructions.ll