[PATCH] [SelectionDAG] Unary vector constant folding integer legality fixes
Simon Pilgrim
llvm-dev at redking.me.uk
Sun Apr 26 07:29:02 PDT 2015
Hi resistor, qcolombet, patrik.h.hagglund,
This patch fixes issues with vector constant folding not correctly handling scalar input operands if they require implicit truncation - this was tested with llvm-stress as recommended by Patrik.
The patch ensures that integer input scalars from a build vector are correctly truncated before folding, and that constant integer scalar results are promoted to a legal type before inclusion in the new folded build vector. I've ran llvm-stress for extended lengths of time without any issue due to the vector constant folding path.
I have added another crash test case and also a test for UINT_TO_FP / SINT_TO_FP using an non-truncated scalar input, which was failing before this patch.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D9282
Files:
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/X86/fold-vector-bv-crash.ll
test/CodeGen/X86/fold-vector-trunc-sitofp.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9282.24443.patch
Type: text/x-patch
Size: 24363 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150426/3eb0d5d3/attachment.bin>
More information about the llvm-commits
mailing list