[llvm-commits] PATCH: Fix bug in DAGCombiner generating illegal vector INT_TO_FP nodes

Tom Stellard tom at stellard.net
Fri Dec 21 08:25:38 PST 2012


Hi,

The attached patch fixes a bug in
DAGCombiner::reduceBuildVecConvertToConvertBuildVec() where
the legality of vector INT_TO_FP and UINT_TO_FP operations was not being
checked correctly.

The test case X86/cvtv2f32.ll, which was added in the same commit that introduces
the bug now fails with this bug fix, so this patch marks it as xfail.
I took a quick look at this test, but I couldn't figure out how to fix it.
I did notice, however, that X86ISelLowering.cpp does this:

setOperationAction(ISD::UINT_TO_FP,       MVT::v2f32, Custom);

which is wrong. it should probably be v2i32 instead, but changing this
did not fix the X86/cvtv2f32.ll test.

-Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DAGCominber-illegal-vec-int-to-fp.patch
Type: text/x-diff
Size: 3166 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121221/1bc8042c/attachment.patch>


More information about the llvm-commits mailing list