[llvm] r292035 - [InstCombine] add test to show missed vector fold; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 08:58:11 PST 2017


Sure - laziness on my part because I already had the fix in the works:
r292063, r292064

It would be great to set some coding guidelines for tests because LLVM
devolves rapidly from cowboy to chaos under llvm/test. :)

On Sat, Jan 14, 2017 at 10:14 PM, Sean Silva <chisophugis at gmail.com> wrote:

> Can you add a comment with a FIXME explaining what we want it to
> eventually do?
>
> On Sat, Jan 14, 2017 at 3:12 PM, Sanjay Patel via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: spatel
>> Date: Sat Jan 14 17:12:29 2017
>> New Revision: 292035
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=292035&view=rev
>> Log:
>> [InstCombine] add test to show missed vector fold; NFC
>>
>> Modified:
>>     llvm/trunk/test/Transforms/InstCombine/signext.ll
>>
>> Modified: llvm/trunk/test/Transforms/InstCombine/signext.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transfor
>> ms/InstCombine/signext.ll?rev=292035&r1=292034&r2=292035&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/test/Transforms/InstCombine/signext.ll (original)
>> +++ llvm/trunk/test/Transforms/InstCombine/signext.ll Sat Jan 14
>> 17:12:29 2017
>> @@ -72,6 +72,19 @@ define i32 @test6(i16 %P) {
>>    ret i32 %tmp.5
>>  }
>>
>> +define <2 x i32> @test6_splat_vec(<2 x i12> %P) {
>> +; CHECK-LABEL: @test6_splat_vec(
>> +; CHECK-NEXT:    [[Z:%.*]] = zext <2 x i12> %P to <2 x i32>
>> +; CHECK-NEXT:    [[SHL:%.*]] = shl nuw <2 x i32> [[Z]], <i32 20, i32 20>
>> +; CHECK-NEXT:    [[ASHR:%.*]] = ashr <2 x i32> [[SHL]], <i32 20, i32 20>
>> +; CHECK-NEXT:    ret <2 x i32> [[ASHR]]
>> +;
>> +  %z = zext <2 x i12> %P to <2 x i32>
>> +  %shl = shl <2 x i32> %z, <i32 20, i32 20>
>> +  %ashr = ashr <2 x i32> %shl, <i32 20, i32 20>
>> +  ret <2 x i32> %ashr
>> +}
>> +
>>  define i32 @test7(i32 %x) {
>>  ; CHECK-LABEL: @test7(
>>  ; CHECK-NEXT:    [[SUB:%.*]] = ashr i32 %x, 5
>>
>>
>> _______________________________________________
>> 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/20170115/68c5c01c/attachment.html>


More information about the llvm-commits mailing list