[llvm] r251780 - [X86] Remove assertions that check for valid scale values on scatter/gather intrinsics. Nothing upstream prevented illegal values from getting here.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 10:13:30 PST 2015
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.
On Mon, Nov 2, 2015 at 8:37 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
> On Sun, Nov 1, 2015 at 11:24 PM, Craig Topper via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: ctopper
>> Date: Mon Nov 2 01:24:40 2015
>> New Revision: 251780
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=251780&view=rev
>> Log:
>> [X86] Remove assertions that check for valid scale values on
>> scatter/gather intrinsics. Nothing upstream prevented illegal values from
>> getting here.
>>
>
> Any particular test case that was missing for this?
>
>
>>
>> Modified:
>> llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
>>
>> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=251780&r1=251779&r2=251780&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Nov 2 01:24:40 2015
>> @@ -16652,10 +16652,6 @@ static SDValue getGatherNode(unsigned Op
>> const X86Subtarget * Subtarget) {
>> SDLoc dl(Op);
>> auto *C = cast<ConstantSDNode>(ScaleOp);
>> - unsigned ScaleVal = C->getZExtValue();
>> - if (ScaleVal > 2 && ScaleVal != 4 && ScaleVal != 8)
>> - llvm_unreachable("Valid scale values are 1, 2, 4, 8");
>> -
>> SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl, MVT::i8);
>> MVT MaskVT = MVT::getVectorVT(MVT::i1,
>>
>> Index.getSimpleValueType().getVectorNumElements());
>> @@ -16689,10 +16685,6 @@ static SDValue getScatterNode(unsigned O
>> SDValue Index, SDValue ScaleOp, SDValue
>> Chain) {
>> SDLoc dl(Op);
>> auto *C = cast<ConstantSDNode>(ScaleOp);
>> - unsigned ScaleVal = C->getZExtValue();
>> - if (ScaleVal > 2 && ScaleVal != 4 && ScaleVal != 8)
>> - llvm_unreachable("Valid scale values are 1, 2, 4, 8");
>> -
>> SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl, MVT::i8);
>> SDValue Disp = DAG.getTargetConstant(0, dl, MVT::i32);
>> SDValue Segment = DAG.getRegister(0, MVT::i32);
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
>
--
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151102/3a1f65f4/attachment.html>
More information about the llvm-commits
mailing list