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)
commit567f886eb030a1efa6d7a87194e504a9f4b39462
treefcc7e05506ee6a36ad6cdae7226e0d71e4688c5a
parentb045514abfecd72353927aafccbf3b50e7eb25b5
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.

llvm-svn: 171420
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/R600/dagcombiner-bug-illegal-vec4-int-to-fp.ll [new file with mode: 0644]
llvm/test/CodeGen/R600/vec4-expand.ll
llvm/test/CodeGen/X86/cvtv2f32.ll