<div dir="ltr">The test case that I modified right before this will fail if you set -filetype=obj. I caught it when i tried to change this llvm_unreachable to an 'if' and noticed that the existing check was allowing 0 through even though the message says only 1, 2, 4, 8 are allowed. I suppose I should have change this to report_fatal_error until we can get isel to check for it and reject matching.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 2, 2015 at 8:37 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>