[PATCH] D21354: Remove redundant direct moves when extracting integers and converting to FP

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 14:55:04 PDT 2016

nemanjai created this revision.
nemanjai added reviewers: amehsan, hfinkel, kbarton, wschmidt, seurer, cycheng, tjablin.
nemanjai added a subscriber: llvm-commits.
nemanjai set the repository for this revision to rL LLVM.

Since we implemented extraction of integer vector elements using direct moves and we use direct moves for int to fp conversions, we end up with strange code when doing both operations. Namely, extracting an element and then converting that to fp results in a direct move out of a VSR followed immediately by a direct move back to a VSRL. This patch just eliminates both of those direct moves.
Power9 instructions won't help this situation so we would still have this issue with Power9 if we don't fix it with a patch like this.

A similar situation exists for extracting/converting integers of other widths, but the fix is non-trivial and it is not clear that there are alternatives that are much better. This can be addressed in the future.

This patch fixes PR 28117.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21354.60762.patch
Type: text/x-patch
Size: 6381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160614/0c291c9a/attachment.bin>

More information about the llvm-commits mailing list