[SDAG] Don't try to use FP_EXTEND/FP_ROUND for int<->fp promotions
authorHal Finkel <hfinkel@anl.gov>
Thu, 12 Feb 2015 22:43:52 +0000 (22:43 +0000)
committerHal Finkel <hfinkel@anl.gov>
Thu, 12 Feb 2015 22:43:52 +0000 (22:43 +0000)
commit8452d01224a5baccc47a89a75c0f02ee512cb8ce
treec610a12baec07c11fdcd435a411aebb8bc549234
parente53f1302f96c1c38b5f272b25417d42550ed6412
[SDAG] Don't try to use FP_EXTEND/FP_ROUND for int<->fp promotions

The PowerPC backend has long promoted some floating-point vector operations
(such as select) to integer vector operations. Unfortunately, this behavior was
broken by r216555. When using FP_EXTEND/FP_ROUND for promotions, we must check
that both the old and new types are floating-point types. Otherwise, we must
use BITCAST as we did prior to r216555 for everything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228969 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
test/CodeGen/PowerPC/vsel-prom.ll [new file with mode: 0644]