[llvm] r289371 - [AVX-512][InstCombine] Teach InstCombineCalls how to simplify demanded for scalar cmp intrinsics with masking and rounding.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 11 00:12:07 PST 2016
Test case added in r289374.
~Craig
On Sun, Dec 11, 2016 at 12:01 AM, Chandler Carruth <chandlerc at google.com>
wrote:
> No test case?
>
> On Sat, Dec 10, 2016 at 11:52 PM Craig Topper via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: ctopper
>> Date: Sun Dec 11 01:42:04 2016
>> New Revision: 289371
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=289371&view=rev
>> Log:
>> [AVX-512][InstCombine] Teach InstCombineCalls how to simplify demanded
>> for scalar cmp intrinsics with masking and rounding.
>>
>> These intrinsics don't read the upper elements of their first and second
>> input. These are slightly different the the SSE version which does use the
>> upper bits of its first element as passthru bits since the result goes to
>> an XMM register. For AVX-512 the result goes to a mask register instead.
>>
>> Modified:
>> llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
>>
>> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/
>> Transforms/InstCombine/InstCombineCalls.cpp?rev=
>> 289371&r1=289370&r2=289371&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
>> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Sun Dec
>> 11 01:42:04 2016
>> @@ -1738,7 +1738,9 @@ Instruction *InstCombiner::visitCallInst
>> case Intrinsic::x86_sse2_ucomigt_sd:
>> case Intrinsic::x86_sse2_ucomile_sd:
>> case Intrinsic::x86_sse2_ucomilt_sd:
>> - case Intrinsic::x86_sse2_ucomineq_sd: {
>> + case Intrinsic::x86_sse2_ucomineq_sd:
>> + case Intrinsic::x86_avx512_mask_cmp_ss:
>> + case Intrinsic::x86_avx512_mask_cmp_sd: {
>> // These intrinsics only demand the 0th element of their input
>> vectors. If
>> // we can simplify the input based on that, do so now.
>> bool MadeChange = false;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161211/1ca7ba4c/attachment.html>
More information about the llvm-commits
mailing list