[PATCH] D17711: Fix for PR 26617 (disable scalar-to-vector conversions using direct moves for 32-bit targets)

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 29 04:15:57 PST 2016


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

When I implemented these conversions, I didn't consider what the results would be if someone attempted to build 32-bit applications on targets that have direct moves. This just disables the problematic conversions when 32-bit registers are used.

Repository:
  rL LLVM

http://reviews.llvm.org/D17711

Files:
  lib/Target/PowerPC/PPCISelLowering.cpp

Index: lib/Target/PowerPC/PPCISelLowering.cpp
===================================================================
--- lib/Target/PowerPC/PPCISelLowering.cpp
+++ lib/Target/PowerPC/PPCISelLowering.cpp
@@ -557,7 +557,7 @@
         setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v4f32, Legal);
         setOperationAction(ISD::EXTRACT_VECTOR_ELT, MVT::v4f32, Legal);
       }
-      if (Subtarget.hasDirectMove()) {
+      if (Subtarget.hasDirectMove() && Subtarget.use64BitRegs()) {
         setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v16i8, Legal);
         setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v8i16, Legal);
         setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v4i32, Legal);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17711.49357.patch
Type: text/x-patch
Size: 694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160229/03f6cd6c/attachment.bin>


More information about the llvm-commits mailing list