[PATCH] D54596: [X86] Remove ANY_EXTEND special case from canReduceVMulWidth
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 15 13:23:13 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL346995: [X86] Remove ANY_EXTEND special case from canReduceVMulWidth (authored by ctopper, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D54596?vs=174269&id=174274#toc
Repository:
rL LLVM
https://reviews.llvm.org/D54596
Files:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Index: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
@@ -34337,24 +34337,8 @@
for (unsigned i = 0; i < 2; i++) {
SDValue Opd = N->getOperand(i);
- // DAG.ComputeNumSignBits return 1 for ISD::ANY_EXTEND, so we need to
- // compute signbits for it separately.
- if (Opd.getOpcode() == ISD::ANY_EXTEND) {
- // For anyextend, it is safe to assume an appropriate number of leading
- // sign/zero bits.
- if (Opd.getOperand(0).getValueType().getVectorElementType() == MVT::i8)
- SignBits[i] = 25;
- else if (Opd.getOperand(0).getValueType().getVectorElementType() ==
- MVT::i16)
- SignBits[i] = 17;
- else
- return false;
- IsPositive[i] = true;
- } else {
- SignBits[i] = DAG.ComputeNumSignBits(Opd);
- if (DAG.SignBitIsZero(Opd))
- IsPositive[i] = true;
- }
+ SignBits[i] = DAG.ComputeNumSignBits(Opd);
+ IsPositive[i] = DAG.SignBitIsZero(Opd);
}
bool AllPositive = IsPositive[0] && IsPositive[1];
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54596.174274.patch
Type: text/x-patch
Size: 1183 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181115/a4a4b0af/attachment.bin>
More information about the llvm-commits
mailing list