<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 1, 2015 at 11:24 PM, Craig Topper via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ctopper<br>
Date: Mon Nov 2 01:24:40 2015<br>
New Revision: 251780<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=251780&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=251780&view=rev</a><br>
Log:<br>
[X86] Remove assertions that check for valid scale values on scatter/gather intrinsics. Nothing upstream prevented illegal values from getting here.<br></blockquote><div><br></div><div>Any particular test case that was missing for this?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=251780&r1=251779&r2=251780&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=251780&r1=251779&r2=251780&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Nov 2 01:24:40 2015<br>
@@ -16652,10 +16652,6 @@ static SDValue getGatherNode(unsigned Op<br>
const X86Subtarget * Subtarget) {<br>
SDLoc dl(Op);<br>
auto *C = cast<ConstantSDNode>(ScaleOp);<br>
- unsigned ScaleVal = C->getZExtValue();<br>
- if (ScaleVal > 2 && ScaleVal != 4 && ScaleVal != 8)<br>
- llvm_unreachable("Valid scale values are 1, 2, 4, 8");<br>
-<br>
SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl, MVT::i8);<br>
MVT MaskVT = MVT::getVectorVT(MVT::i1,<br>
Index.getSimpleValueType().getVectorNumElements());<br>
@@ -16689,10 +16685,6 @@ static SDValue getScatterNode(unsigned O<br>
SDValue Index, SDValue ScaleOp, SDValue Chain) {<br>
SDLoc dl(Op);<br>
auto *C = cast<ConstantSDNode>(ScaleOp);<br>
- unsigned ScaleVal = C->getZExtValue();<br>
- if (ScaleVal > 2 && ScaleVal != 4 && ScaleVal != 8)<br>
- llvm_unreachable("Valid scale values are 1, 2, 4, 8");<br>
-<br>
SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl, MVT::i8);<br>
SDValue Disp = DAG.getTargetConstant(0, dl, MVT::i32);<br>
SDValue Segment = DAG.getRegister(0, MVT::i32);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>