OSDN Git Service

DAGCombiner: Avoid generating illegal vector INT_TO_FP nodes
authorTom Stellard <thomas.stellard@amd.com>
Wed, 2 Jan 2013 22:13:01 +0000 (22:13 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 2 Jan 2013 22:13:01 +0000 (22:13 +0000)
commitd40758b24ebab5777131533d9369e707fc852594
treece952299e65b4a86221f9f378b6cec58639b7b23
parent5bf3a28b36c5d95ad3732b749db651630027b09c
DAGCombiner: Avoid generating illegal vector INT_TO_FP nodes

DAGCombiner::reduceBuildVecConvertToConvertBuildVec() was making two
mistakes:

1. It was checking the legality of scalar INT_TO_FP nodes and then generating
vector nodes.

2. It was passing the result value type to
TargetLoweringInfo::getOperationAction() when it should have been
passing the value type of the first operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171420 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/R600/dagcombiner-bug-illegal-vec4-int-to-fp.ll [new file with mode: 0644]
test/CodeGen/R600/vec4-expand.ll
test/CodeGen/X86/cvtv2f32.ll