summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2014-08-04 13:27:12 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2014-08-04 13:27:12 +0000
commit51eccec5d98ff79fc19cc3407f8163e821f48e54 (patch)
tree2b3026588fe56a57ca6f7318ccd83b44546bd0c4 /llvm/lib/Target/PowerPC
parenta5cb453cd3fc08ec557363c1f368703acddd29ba (diff)
downloadbcm5719-llvm-51eccec5d98ff79fc19cc3407f8163e821f48e54.tar.gz
bcm5719-llvm-51eccec5d98ff79fc19cc3407f8163e821f48e54.zip
[PowerPC] MULHU/MULHS are not legal for vector types
I ran into some test failures where common code changed vector division by constant into a multiply-high operation (MULHU). But these are not implemented by the back-end, so we failed to recognize the insn. Fixed by marking MULHU/MULHS as Expand for vector types. llvm-svn: 214716
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelLowering.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index a0f72568ad1..bd74a09a876 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -453,6 +453,8 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Expand);
setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Expand);
setOperationAction(ISD::BUILD_VECTOR, VT, Expand);
+ setOperationAction(ISD::MULHU, VT, Expand);
+ setOperationAction(ISD::MULHS, VT, Expand);
setOperationAction(ISD::UMUL_LOHI, VT, Expand);
setOperationAction(ISD::SMUL_LOHI, VT, Expand);
setOperationAction(ISD::UDIVREM, VT, Expand);
OpenPOWER on IntegriCloud